March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now
Hi,
Does anyone know of a measure that could be used to determine the percentage rate for the current month and that of the previous month? Below is a table showing the figures I expect to see with the appropriate dax measure. I have also included the dax measure which sadly hasn't worked and a link to the pbix file.
Many thanks in advance for any help.
Solved! Go to Solution.
Hi @Anonymous
There's no need for a "this month rate" measure. When you use it in visuals, filter context will take care of calculating it for that month only. LastMonthRate should be this:
LastMonth Rate =
CALCULATE(
[Rate],
PREVIOUSMONTH(dim_date[day_date])
)
And here's the results
Hope this helps! 🙂
Hi, @Anonymous ;
You could create a measure.
LastMonth Rate2 =
CALCULATE([Rate],FILTER(ALLSELECTED('Query2'),[Category]=MAX('Query2'[Category])&&EOMONTH([ActivityDate],0)=EOMONTH(MAX('Query2'[ActivityDate]),-1)))
The final show:
Best Regards,
Community Support Team _ Yalan Wu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi, @Anonymous ;
You could create a measure.
LastMonth Rate2 =
CALCULATE([Rate],FILTER(ALLSELECTED('Query2'),[Category]=MAX('Query2'[Category])&&EOMONTH([ActivityDate],0)=EOMONTH(MAX('Query2'[ActivityDate]),-1)))
The final show:
Best Regards,
Community Support Team _ Yalan Wu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Thank you so much and your suggestion worked as it relates to determining LastMonthRate. Could the measure be amended to calculate the CurrentMonthRate? Ideally, I need a measure for Current Month Rate as well. Many thanks for your help once again.
I have just amended the measure you created for LastMonthRate and been able to create CurrentMonthRate successfully (see dax measure below and a table with the results I expected). Many thanks once again for your help with this.
Hi @Anonymous
Do you have a date table and is it marked appropriately? If so this would be very easy using Time Intelligence. Current month would be however you are calculating it now. Prior month would be
CALCULATE(
[Rate],
PREVIOUSMONTH(DateTable[Date])
)
Hope this helps!
I have got a date table and did create a measure similar to the one you proposed to determine previous month's percentage rate but it didn't work!
@Anonymous can you provide a sample pbix file?
Please see a link to the pbix file below.
Hi @Anonymous
There's no need for a "this month rate" measure. When you use it in visuals, filter context will take care of calculating it for that month only. LastMonthRate should be this:
LastMonth Rate =
CALCULATE(
[Rate],
PREVIOUSMONTH(dim_date[day_date])
)
And here's the results
Hope this helps! 🙂
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
129 | |
90 | |
75 | |
58 | |
53 |
User | Count |
---|---|
200 | |
104 | |
101 | |
67 | |
55 |