Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
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.
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 41 | |
| 38 | |
| 36 | |
| 30 | |
| 28 |
| User | Count |
|---|---|
| 128 | |
| 88 | |
| 79 | |
| 67 | |
| 62 |