Forum Discussion
Matrix - conditional formatting single row
- 1 year ago
hi cn4422
How do you identify a single country column? What makes one a single country? Or do you mean only Deutschland is to be formatted? If so, create the measures that return the values just for that specific country and apply the conditional formatting to those measures. Example:
Anzahl - Deutschland = CALCULATE ( [Anzahl], KEEPFILTERS ( 'table'[Country] = "Deutschland" ) )
The measure returns blank for all other countries. So if you treat as zero then formatting will be applied to those blanks values if using gradient. Use dont format.
danextian wrote:The measure returns blank for all other countries. So if you treat as zero then formatting will be applied to those blanks values if using gradient. Use dont format.
danextian ah, that does the trick, thank you very much! 👍
Do you per chance also know if it is possible to format each column based based on itself?
So that the "gradient" does not inlcude the data of the whole matrix as reference, as on this screenshot:
.... but rather each column as its own entity.
- danextian1 year agoSuper User
You mean to format based on the max value of each column? You can rank row categories within that column. Example.
Rank per Geo = RANKX ( ALL ( Geo ), [Total Revenue],, DESC, DENSE )- cn44221 year agoHelper V
danextian wrote:You mean to format based on the max value of each column?
Yes, that's exactly what I meant!
So you suggest to include a ranking for each column and then use the ranking as a reference for the formatting?
- danextian1 year agoSuper User
Yup. Or you can use percentages instead
DIVIDE ( [total revenue], CALCULATE ( [total revenue], ALL ( geo[geo] ) ) )With rank, you'll get just the number of distinct values to based formatting on. With percentage, the gradient will be based on the min and max percentage value across the whole matrix.