Forum Discussion

sandeshag's avatar
sandeshag
Frequent Visitor
2 years ago
Solved

Field parameter to calculate SAMEPERIODLASTYEAR

Hi Folks,

 

I was trying to use field parameter(Measure selector) to calculate SAMEPERIOLASTYEAR.

 

Field parameter slicer looks like

 

Sales

Profit

Quantity

 

Measure_Prev_Year =
CALCULATE (
    sum(field_parameter),
        SAMEPERIODLASTYEAR ('Calendar'[Date])
    )
 
Now based on the selection from user on field parameter the Measure_Prev_Year measure should automatically calculate the value based on the selection. 
 
But this is not working and giving error. Not sure whether can we use field parameter measure in calculation which contains SAMEPERIODLASTYEAR function. 
 
Need suggestion on how to crack this requirement.

 

2 Replies