Forum Discussion
Conditional formatting based on multiple conditions
- Anonymous8 years ago
Hi Anonymous
Can you try this?
Create a measure
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.
Thanks
Raj
Hi Anonymous
Can you try this?
Create a measure
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.
Thanks
Raj
Hello Raj,
I came across your post while looking for a solution to my problem. I created a measure just as you have suggested:
Condition =
MAXX(OrderItem,
IF(OrderItem[Remaining Inventory] < OrderItem[Redeemed]*.2,1,
IF(OrderItem[Remaining Inventory]< OrderItem[Redeemed] * .5,2,
IF(OrderItem[Remaining Inventory] > OrderItem[Redeemed] *.5,3)
)
)
)but I don't seem to have the same options for applying this condition that you show in your screengrab. As you can see in my screenshot, I don't have the option to apply color to a column based on my measure.
Am I missing something?
Thanks very much.
Travis
- a68tbird7 years agoResolver II
I guess the Conditional Formatting window has changed somewhat. I was able to replicate what I needed to do based on this screenshot:
- Anonymous7 years agoNot applicable
Hi,
I have different countriesin my data and I would like to have different conditional formatting between countries for the same measure/metric. My fact tables are connected to a Team table which has a column Country filled for each team. That means each of the fact table rows can be connected to country information.
How should I modify the aforementioned "Condition measure" to take this into consideration? I would need something like this
If team[country] = Norway then value for red is 1, for yellow 2, for red 3
if team[country] = Germany then value red is 10, for yellow 20, for red 30
etc.