Hello @Harris,
Thank You for posting your query onto the Forum.
In case, you don’t want a Calculation Group to be applied to certain measures then you need to edit your each calculation items by writing a measure like this inside your Tabular Editor -
IF(
ISSELECTEDMEASURE(
[Total Sales By Order Date] ,
[Total Costs] ,
[Total Profits] ) ,
CALCULATE( SELECTEDMEASURE() ,
DATEADD( Dates[Date] , -7 , DAY ) ) )
This will consider only those measures on which you want to apply Calculation Groups effect. That is, in this case, “ISSELECTEDMEASURE()” measure will check the list of measures mentioned inside it on which you want the effect to be applied and if that measure is not found inside the list then that’ll not be evaluated and showcased as blanks.
Alternatively, you can write the same logic as -
IF(
ISSELECTEDMEASURE( [Total Sales By Shipping Date] ) ,
BLANK() ,
CALCULATE( SELECTEDMEASURE() ,
DATEADD( Dates[Date] , -7 , DAY ) ) )
In this case, I’m specifically mentioning only the measure that needs to be excluded from evaluation of Calcualtion Groups. So any measure not mentioned inside this list will be evaluated.
So it’s best to go with option no. 1 where we specifically mention only the list of those measures that needs to be considered for evaluation by Calculation Groups rather than option no. 2.
Or else if you don’t want to showcase those measures as blanks then write it like this -
IF(
ISSELECTEDMEASURE(
[Total Sales By Order Date] ,
[Total Costs] ,
[Total Profits] ) ,
CALCULATE( SELECTEDMEASURE() ,
DATEADD( Dates[Date] , -7 , DAY ) ) ,
[Total Sales By Shipping Date] )
In this case, only the measures mentioned inside the list of “ISSELECTEDMEASURE()” will change and the measures outside the list will showcase the original values and will not change at all.
I’m also attaching the working of the PBIX file for the reference purposes wherein I’ve created 4 calculation items inside a calculation group called “Time Intelligence”.
1). Calculation item related to “Current Day” will showcase all the measures as it is.
2). Calculation item related to “Last 7 Days” will evaluate all the measures except “[Sales by Shipping Date]”. This measure will showcase the original figures as it is.
3). Calculation item related to “Last 14 Days” and “Last 21 Days” will evaluate all the measures except “[Sales by Shipping Date]”. In this case, this measure will be evaluated as blanks.
Hoping you find this useful and meets your requirements that you’ve been looking for.
Thanks and Warm Regards,
Harsh
Excluding Measures From Calculation Groups - Harsh.pbix (3.5 MB)