I'm tying to compare Azure Cost Management cost to the previous month. The goal is to understand what resources reduce their costs.
I followed this guide that helped me setup PREVIOUSMONTH this way:
PreviousMonth = CALCULATE(
SUM('Usage details'[costInBillingCurrency]),
PREVIOUSMONTH('Usage details'[date].[Date]))
But this formula only returns a blank column.
So I followed this guide that helped me setup this code:
PreviousMonth = CALCULATE(
SUM('Usage details'[costInBillingCurrency]),
PREVIOUSMONTH('Usage details'[date].[Date]),
ALLEXCEPT('Usage details','Usage details'[subscriptionName],'Usage details'[resourceGroupName],'Usage details'[ResourceName] ))
Now values are returned but they are wrong.
So I setup this measure and again the column is empty:
Measure = CALCULATE(
SUM('Usage details'[costInBillingCurrency]),
MONTH('Usage details'[date])=MONTH(TODAY())-1,
YEAR('Usage details'[date])=YEAR(TODAY()))
So how to compare the Azure cost of rescues December VS November?
EDIT: I'm adding new raw data:
Here is the problem:
- the database "preview" exists in October and November but not in December.
- the database "dev" exists only in December
This means that if I select December as a current month I should see dev for the current month but not for the previous month
And in the other hand I should see the preview database for the month of November but an empty space for the month of December.
Ideally I would like to use the color Red/Green for the current month and color in green if the costs is decreased, red if the cost has increased.