Reputation: 12237
I previously asked a question about how to use PREVIOUSMONTH and thanks to that I was able to create 2 columns:
I now would like to change the background color so the number could be:
Like this:
I checked into Conditional Formatting > Background Color but I think there is no option for doing that.
So I created this DAX rule:
PreviousMonthCheck =
IF ([PreviousMonth] < MAX('Usage details'[costInBillingCurrency]),1,
IF ([PreviousMonth] = MAX('Usage details'[costInBillingCurrency]),2,
IF ([PreviousMonth] > MAX('Usage details'[costInBillingCurrency]),3,
"Fourth case"
)
)
)
Now, how to use this rule to color the SelectedMonth?
Or is there any Visual that could do that out-of-the-box?
Upvotes: 1
Views: 1622
Reputation: 30219
For this, you can do it with native visuals. In the custom formatting, choose Rules and then reference your measure. Add the 3 rules as below.
BTW, your measure can and should be simplified using the SWITCH(TRUE()) pattern.
Upvotes: 1