Forum Discussion
Impossible to use SAMEPEDIODASLASTYEAR and filter at the same time
morning all
believe it or not, i did not find the solution here...:)
i have a Clustered Column chart with values forlast 6 months , based on "SignatureDate". to get these values, I use a filter on SignatureDate for the last 6 months.
I created a measurement to get the same numbers last years
- Anonymous3 years ago
Hi DavidM06 ,
Here I add a range [Date]<=_RANGESTART && [Date]>=_RANGEEND in my FILTER. So we don't need to use SAMEPERIODLASTYEAR in our code.
Best Regards,
Rico ZhouIf this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
3 Replies
- AnonymousNot applicable
Hi DavidM06 ,
Here I suggest you to try ALL() code to create a measure.
LY = VAR _RANGESTART = EOMONTH ( MAX ( CRM[DateSignature] ), -13 ) + 1 VAR _RANGEEND = EOMONTH ( MAX ( CRM[DateSignature] ), -12 ) RETURN CALCULATE ( SUM ( Haraka[TCV] ), FILTER ( ALL ( CRM ), CRM[DateSignature] >= _RANGESTART && CRM[DateSignature] <= _RANGEEND ) )Best Regards,
Rico ZhouIf this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- DavidM06Regular Visitor
thanks, but where is the SAMEPERIODLASTYEAR parameter ?
- AnonymousNot applicable
Hi DavidM06 ,
Here I add a range [Date]<=_RANGESTART && [Date]>=_RANGEEND in my FILTER. So we don't need to use SAMEPERIODLASTYEAR in our code.
Best Regards,
Rico ZhouIf this post helps, then please consider Accept it as the solution to help the other members find it more quickly.