I have a percent column with conditional formatting on it “where value < 1”, and this formatting is also applied to the column total.
If all rows contain values, the total row is formatted properly.
If one or more rows contain nulls, the total row is not formatted properly, even though its value is correct and visually satisfies the condition.
It’s like the value the condition is checking is null, whereas the value displayed is not null.
The consequence is that the row total format is an unreliable call to action, as one has to scroll up and down to view all rows to see if any are conditionally formatted…
When you say all rows, do you mean all the dimension values, or all the measure values? I ran some tests with some null dimension values and some null measure values, and couldn’t get it to format weirdly.
Could you give some more detailed steps to reproduce? I might have missed something.
I narrowed down the issue a bit more. The conditional formatting of the total cell is only incorrect when its value is zero. Maybe there is a specific bug around the handling of nulls vs. 0 for total conditional formatting?
In order to get nulls to show up in the column, the measure must be on a child view, left outer joined onto the explore. I was unable to reproduce using a single view and just sticking null values into the cells because Looker applies a coalesce(value, 0).
I came up with an example that reproduces the issue. I added two identical columns to illustrate the issue: percent_done1’s total is 0% and it is not conditionally formatted properly, whereas percent_done2’s total is 50% and it is conditionally formatted properly. Further, the non-total cells of the percent_done1 column are conditionally formatted properly even when they equal zero. The conditional formatting is identical for both columns, “is less than 1” (meaning, less than 100%).
Code and dashboard source follow…
And here’s the LookML dashboard export:
Oh, interesting. Thanks for the detailed walkthrough, Steve. I’ll get it reproduced internally and then patched up— Updates will be here!
I’m having a similar issue, my conditional formatting is highlighting the total rows differently (incorrectly) when there is a table calc involved. The two in the screenshot should be green when > 0.95 (95%) and red when below. This is worked out correctly on a row by row level but not for the total. Not sure if it’s because it’s a table calc?
In all instances, so far, I’ve seen the total row copy what the first row’s formatting is
To add to this, I can’t get rid of formatting for the total row now either, it’s jammed on!
This is a known bug with our new table visualization that has been fixed internally but not deployed yet. If you need it to work right now, you can use the “Table-Legacy” visualization where the functionality should be OK-- But we have fixed the issue and the fix should be present when v7.4 lands on instances, beginning next week.