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! It's time to submit your entry. Live now!
Hi All,
I have created a slicer for financial periods MTH,QTR,YTD 'Select Period' then I use it filter the columns. What is the DAX for equivalent last year, so same month last year, same qtr last year and last year?
--Slicer wrapper around measure for current year
Slicer GWP = if(HASONEVALUE('Select Period'[Period]),
SWITCH(VALUES('Select Period'[Period]),
"MTH", CALCULATE([New Total GWP],DATESMTD('PA New Business'['Issue Date (Formatted)])),
"QTR", CALCULATE([New Total GWP],DATESQTD(DATESMTD('PA New Business'['Issue Date (Formatted)]))),
"YTD", CALCULATE([New Total GWP],DATESYTD(DATESMTD('PA New Business'['Issue Date (Formatted)])))),
CALCULATE([New Total GWP],DATESMTD('PA New Business'['Issue Date (Formatted)]))) />
Solved! Go to Solution.
The Power BI Data Visualization World Championships is back! It's time to submit your entry.
| User | Count |
|---|---|
| 6 | |
| 5 | |
| 4 | |
| 4 | |
| 3 |
| User | Count |
|---|---|
| 12 | |
| 9 | |
| 8 | |
| 7 | |
| 7 |