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 want to compare data with the results in the same periode last year and have the next DAX formula:
When i don't use a date-filter visual i see that the line "Total Calls LY" (last year) also shows the next year.
How can i complete the DAX formula that it have a maximum date of the current date?
Thanks
Solved! Go to Solution.
The easiest way I've found to deal with this is to just check for a current value ...
Total Calls LY = IF( [Total Calls],
CALCULATE( [Total Calls] ; SAMEPERIODLASTYEAR( Datum[Date])),
BLANK())
You actually don't need the third argument - BLANK() - because BLANK() is the default third argument for the IF() formula.
The easiest way I've found to deal with this is to just check for a current value ...
Total Calls LY = IF( [Total Calls],
CALCULATE( [Total Calls] ; SAMEPERIODLASTYEAR( Datum[Date])),
BLANK())
You actually don't need the third argument - BLANK() - because BLANK() is the default third argument for the IF() formula.
Thanks a lot for the solution. It works fine
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 39 | |
| 35 | |
| 34 | |
| 32 | |
| 27 |
| User | Count |
|---|---|
| 136 | |
| 96 | |
| 77 | |
| 67 | |
| 65 |