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" ) )
If you want to apply conditional formatting to a specific country in a matrix, here's how you can do it:
I created a measure to apply the conditional formatting. For example, if I want to format only the data for "Australia," the measure looks like this:
Australia % =IF(AND(ISINSCOPE('Global-Superstore'[Country]),MAX('Global-Superstore'[Country]) ="Australia"),[Discount %],0)
After creating the measure, I applied it as the conditional formatting rule for the Discount column. This ensures that the formatting is only applied to the rows corresponding to "Australia."
I tested this approach with sample data, and it worked perfectly. You can adapt this logic for other countries by simply changing "Australia" to the desired country's name in the measure.
Let me know if you have any questions!
Thanks
Lavdeep Sharma
Lavdeepsharma Many thanks for your reply - I will also try out your approach! 🙂
Does hist work with format style "gradient" as well for you or just for "rules"?