Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hi,
I need to show the current period and previous period as KPIs. How do I create the measure for the previous period?
For Current period I used
Current Period = Calculate(sum(Amount), Filter( Table[Reporting Period] = Max(Reporting Period])
Previous Period = ??
From a performance perspective is there a better way to get the Current period measure? Filter interates should the entire table ?
Can use a variable and have VAR MaxPeriod = Max(Reporting Period) and use this in the Calculate function?
thanks for looking into this.
What are the periods you are looking for?
There are a few things you can do including:
Let me know if any of these solutions help, if not we can work through some other solutions but these are a quick way to get what you're looking for.
Thanks for your reply.
The current period is Jan 2020 and I previous period is Dec 2019.
How do I calculate the the measure for Dec 2019?
This can be accomplished by using the PREVIOUSMONTH DAX function.
It should look something like this:
=CALCULATE(SUM(Amount), PREVIOUSMONTH(Table[Reporting Period]))
Hi @dax
That was very useful. Let me try it out
But why do we have to use
Hi @Anonymous ,
You could think this as calculate based on KPI group. And you also could refer to allexcept-function-dax for more details.
Best Regards,
Zoe Zhi
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
108 | |
100 | |
78 | |
64 | |
58 |
User | Count |
---|---|
148 | |
111 | |
94 | |
84 | |
67 |