Supplies are limited. Contact info@espc.tech right away to save your spot before the conference sells out.
Get your discountScore big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount
Hello,
I am trying to achieve the below table with calculation items. And the below DAX will return the variable result instead of the return value. For the Actual values I have the correct numbers and separate calculation item which works fine, but for Prior Period item it return the Actual values.
Table
Measure | Actual | Prior Period
Prior Period =
VAR Actual =
SWITCH (
SELECTEDVALUE ( 'MTD_YTD'[Num] );
1; SELECTEDMEASURE ();
2; CALCULATE (
SELECTEDMEASURE ();
FILTER ( 'Date_Dim'; DAY ( 'Date_Dim'[Date] ) < DAY ( TODAY () ) + 1 )
);
3; CALCULATE ( SELECTEDMEASURE (); DATESYTD ( 'Date_Dim'[Date] ) )
)
RETURN
SWITCH (
SELECTEDVALUE ( 'Prior Per'[Num] );
2; CALCULATE ( actual; PREVIOUSMONTH ( 'Date_Dim'[Date] ) );
3; CALCULATE ( actual; SAMEPERIODLASTYEAR ( 'Date_Dim'[Date] ) )
)
Hi @Anonymous ,
Please share me a dummy PBIX file without real data or sensitive information. Then I can carry out specific tests.
Best Regards,
Icey