Forum Discussion
Overlap or change colour in the chart based on conditional formatting
Hi guys,
I wonder how I can change the colour in my chart based on condition. I am currently use 2 measures under Values.
I tried using 1 measure it works but not working for 2 measures.
Are there any charts or Dax query can help me here?
Appreciate your reply.
Thank you
- Anonymous4 years ago
Hi VictoriaNguyen ,
According my study, now Power BI does not support Conditional formating for 2 fields. Maybe you can use dax to write 2 conditions in a column then add to conditional formating. Please refer to the following dax.
Condition = MAXX(Ex_Format, IF(Ex_Format[Cabin]="Business"&& Ex_Format[Seats] >10, 1, IF(Ex_Format[Cabin]="Business"&& Ex_Format[Seats] <=10,2, IF(Ex_Format[Cabin]="Economy"&& Ex_Format[Seats] <=10, 3, IF(Ex_Format[Cabin]="Economy"&& Ex_Format[Seats] >10 && Ex_Format[Seats]<=40, 2)))))Here, 1 -> Green. 2-> Orange, 3-> Red.
and then do the conditional formatting like this:
your result will be like this:
Hope this is what you are looking for.
Or maybe you can vote here.
Conditional formating for 2 fields on values of Funnel visual
If I have misunderstood your meaning, please provide more details with your desired output ( Final output in image form and you pbix file without privacy information.
Best Regards
Community Support Team _ Polly
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
1 Reply
- AnonymousNot applicable
Hi VictoriaNguyen ,
According my study, now Power BI does not support Conditional formating for 2 fields. Maybe you can use dax to write 2 conditions in a column then add to conditional formating. Please refer to the following dax.
Condition = MAXX(Ex_Format, IF(Ex_Format[Cabin]="Business"&& Ex_Format[Seats] >10, 1, IF(Ex_Format[Cabin]="Business"&& Ex_Format[Seats] <=10,2, IF(Ex_Format[Cabin]="Economy"&& Ex_Format[Seats] <=10, 3, IF(Ex_Format[Cabin]="Economy"&& Ex_Format[Seats] >10 && Ex_Format[Seats]<=40, 2)))))Here, 1 -> Green. 2-> Orange, 3-> Red.
and then do the conditional formatting like this:
your result will be like this:
Hope this is what you are looking for.
Or maybe you can vote here.
Conditional formating for 2 fields on values of Funnel visual
If I have misunderstood your meaning, please provide more details with your desired output ( Final output in image form and you pbix file without privacy information.
Best Regards
Community Support Team _ Polly
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.