I have the following code I found online to provide me Prior Period calculations based on a slider. It works perfectly if you select one Month/Quater/Year. However, it fails when selecting multiple periods within the Month/Quarter/Year. Is there a way I change the code to get the desired results? I have tried replacing "HASONEVALUE" with "VALUES" and I get an error. Thank you in advance for your help!
Conc SM Gross PP:= VAR DateCount = COUNTROWS ( 'Report Date' ) VAR PeriodType = SWITCH ( TRUE (),
AND ( HASONEVALUE ('Report Date'[CalendarYearID]), DateCount = COUNTROWS ( PARALLELPERIOD ('Report Date'[Date], 0, YEAR ) ) ), "Year",