Forum Discussion
Conditional formatting on matrix table
- Anonymous2 years ago
Hi ferk_23 ,
According to your description, KPI Name and Version as rows and Month as columns are used, and conditional formatting on rows is not supported by design. It is recommended that you create a table visual object.
(1)This is my test data.
(2)We can create a measure.
color = var _a=CALCULATE(SUM('Table'[Month]),FILTER(ALL('Table'),'Table'[KPI Name]=MAX('Table'[KPI Name]) && 'Table'[Version]="A")) var _b=CALCULATE(SUM('Table'[Month]),FILTER(ALL('Table'),'Table'[KPI Name]=MAX('Table'[KPI Name]) && 'Table'[Version]="B")) return IF(_a>= _b,"#1AAB40", "#D64554")(3)Set the conditional format.
(4)Then the result is as follows.
If the above one can't help you get the desired result, please provide some sample data in your tables (exclude sensitive data) with Text format and your expected result with backend logic and special examples. It is better if you can share a simplified pbix file. Thank you.
Best Regards,
Neeko Tang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi ferk_23 ,
According to your description, KPI Name and Version as rows and Month as columns are used, and conditional formatting on rows is not supported by design. It is recommended that you create a table visual object.
(1)This is my test data.
(2)We can create a measure.
color =
var _a=CALCULATE(SUM('Table'[Month]),FILTER(ALL('Table'),'Table'[KPI Name]=MAX('Table'[KPI Name]) && 'Table'[Version]="A"))
var _b=CALCULATE(SUM('Table'[Month]),FILTER(ALL('Table'),'Table'[KPI Name]=MAX('Table'[KPI Name]) && 'Table'[Version]="B"))
return IF(_a>= _b,"#1AAB40", "#D64554")
(3)Set the conditional format.
(4)Then the result is as follows.
If the above one can't help you get the desired result, please provide some sample data in your tables (exclude sensitive data) with Text format and your expected result with backend logic and special examples. It is better if you can share a simplified pbix file. Thank you.
Best Regards,
Neeko Tang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
It worked! I have several months as columns, you also know if it's possible to iterate over the columns and find the column with the previous month? In this case would be October (bc we are in November). The month columns have this format: MMM'YY (Oct'23).