Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi experts
I have the following issue:
Detecting the records with a time difference of less than 180 days:
if(interval([Termination Date]-[Contractual Start Date], 'd')<180, 1,0)
The above IF condition must be implemented in this SUM expression, any ideas?
sum(
{<[YearMonth]={"$(='>=' & Monthstart(Addmonths(Max(YearMonth),-11)) & '<=' & MonthEnd(Max(YearMonth)))"}>}
Joiner)
Many thanks, Tom
Hi Tom,
I have a personal rule that helps me a lot: if a Measure Expression looks too complex, maybe it is time to revisit your Load Script.
So, can you move the if(interval([Termination Date]-[Contractual Start Date], 'd')<180, 1,0) expression to your Load Script as a field - like [LessThan180Flag]? This will make your Measure way easier to do:
Sum({<[LessThan180Flag]={1}>} Joiner)
Hi Tom,
I have a personal rule that helps me a lot: if a Measure Expression looks too complex, maybe it is time to revisit your Load Script.
So, can you move the if(interval([Termination Date]-[Contractual Start Date], 'd')<180, 1,0) expression to your Load Script as a field - like [LessThan180Flag]? This will make your Measure way easier to do:
Sum({<[LessThan180Flag]={1}>} Joiner)