Null values in a pivot table can't be highlighted using the ' When Cell is Null' custom formatting condition #41708
Labels
.Frontend
Priority:P2
Average run of the mill bug
.Team/DashViz
Dashboard and Viz team
Type:Bug
Product defects
Visualization/Tables
Raw, summarized, and pivoted tables
Describe the bug
We were trying to create a custom formatting rule that would highlight any null values in our pivot table, but the "null" cells were not being highlighted. When introspecting the data returned by the query in developer tools, we can see that the summed values that we were attempting to highlight if they were null are never actually null in the data returned by the query, but it appears that the pivot table instead ignores any data in the "rows" object where any of the breakouts are null.
For example:
If I have a pivot table with a sum aggregation broken out by name, type and year. There is a value in a row for 2021, but not 2022 and 2023. In the data.rows object array returned by the query I have several objects in the array that match my summed value. Each object contains a value for the sum, but for all but one object (where year=2021) at least one of the name, type or year breakout value is null. I imagine these null breakout values are what the pivot table is using to decide whether or not to display a value in the cell. I think because of this, the conditional formatting rule never considers the sum in the other years to be null and therefore won't highlight it in the pivot table.
To Reproduce
Expected behavior
Empty cells in a pivot table should be highlighted when the custom formatting rule is applied.
Logs
No response
Information about your Metabase installation
Severity
annoying
Additional context
No response
The text was updated successfully, but these errors were encountered: