I previously asked a question about how to use PREVIOUSMONTH and thanks to that I was able to create 2 columns:
- first one with the current month spending per resource on Azure
- second one with the same resources on the previous month:
I now would like to change the background color so the number could be:
- **Red ** if the cost has increased
- **Green ** if the cost has decreased
- **Yellow ** if the price is the same
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?