Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!
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.
User | Count |
---|---|
42 | |
28 | |
23 | |
18 | |
15 |
User | Count |
---|---|
54 | |
35 | |
18 | |
18 | |
15 |