Hi,
I have a metric with many dimensions. I’d like to apply conditional formatting so the forecast months appear in yellow. However, it seems like the metric used to set up the conditional formatting must be populated for every level of granularity, even if it only changes based on the Month dimension.
Am I missing something here?
Best way to set up conditional formatting for sparse metrics
Best answer by Dhiraj Khivsara
Hi Tom, you’re not missing anything. If a dimension is missing from the formatting metric, the rule only works at total level, so in practice the flag does need Segment and Product.
What fixes the density problem is how you build the flag. Keep your forecast logic in a small metric on Month x Version only (say Is Forecast, boolean). Then build the formatting metric on all 4 dimensions, but scope it to where Amount has data:
IF(ISDEFINED(‘Amount’) AND ‘Is Forecast’, TRUE)
Two things matter here. The ISDEFINED check means the flag only exists where Amount exists, so it is exactly as sparse as Amount. And return TRUE or blank, never FALSE, because FALSE values fill every cell.
The one trade-off is that empty forecast cells won’t be yellow, only cells that hold a value. If you need empty input cells highlighted too, scope on a “valid Segment x Product combination” boolean instead of Amount.
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.



