Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I have a little problem. I would like to have if-statement to decide my value within the set analysis.
Here is what I have tried:
varMaxDate is a variable, that holds the max date.
And I don't actually use YYYY or WW fields, I just needed to change them for security reasons.
=sum({<WW={'(if(isNull(GetFieldSelections(WW)),week(varMaxDate),WW))'}, YYYY={'(if(isNull(GetFieldSelections(YYYY)),year(varMaxDate),YYYY)'} >}#1)
Cheers,
Niko
Try this:
=Sum({<WW={'$(=If(IsNull(GetFieldSelections(WW)), Week(varMaxDate), WW))'}, YYYY={'$(=If(IsNull(GetFieldSelections(YYYY)), Year(varMaxDate), YYYY))'}>} #1)
Try this:
=Sum({<WW={'$(=If(IsNull(GetFieldSelections(WW)), Week(varMaxDate), WW))'}, YYYY={'$(=If(IsNull(GetFieldSelections(YYYY)), Year(varMaxDate), YYYY))'}>} #1)
Well that worked well, thank you!