Forum Discussion
conditional formatting to 1 row in metrix
Hi team,
As provided input and output following. I need to apply conditional formatting to only plan.
if actual - plan is negative then red & if its positive then green.
I have created this in metrix. please guide me on this.
Regards,
Narendra
- Anonymous3 years ago
HI NILU090,
You can use conditional formatting with expression mode to use Dax formula as format rules:
Apply conditional table formatting in Power BI - Power BI | Microsoft Learn
formula = VAR currAttribute = SELECTEDVALUE ( Table[Attribute] ) VAR result = CALCULATE ( SUM ( Table[Value] ), ALLSELECTED ( Table ), VALUES ( Table[Attribute] ), VALUES ( Table[Date] ) ) RETURN IF ( currAttribute = "Plan", IF ( result > 0, "Green", "Red" ), "Black" )Regards,
Xiaoxin Sheng
2 Replies
- AnonymousNot applicable
HI NILU090,
You can use conditional formatting with expression mode to use Dax formula as format rules:
Apply conditional table formatting in Power BI - Power BI | Microsoft Learn
formula = VAR currAttribute = SELECTEDVALUE ( Table[Attribute] ) VAR result = CALCULATE ( SUM ( Table[Value] ), ALLSELECTED ( Table ), VALUES ( Table[Attribute] ), VALUES ( Table[Date] ) ) RETURN IF ( currAttribute = "Plan", IF ( result > 0, "Green", "Red" ), "Black" )Regards,
Xiaoxin Sheng
- NILU090
Helper II
hi,
i wanted to deduct actual from plan. If answer is negative then apply green color & if its positive apply red colour. ex JAN month - 70 actual, 94 plan.. we cant reach to plan amount so it should red