Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello everyone,
I'm trying to use Set Analysis on a Text Box with the following expression:
=Num(sum({<Period={'$(=$(vMaxPeriodAnt))'}>}[Total Amount TC]),'#,##0')
My variables are this ones:
vMaxPeriod=Max(Period) and vMaxPeriodAnt=if(right($(vMaxPeriod),2)='01',Period-89,Period-1)
Have tried differents expressions but still 0 as result, when i use Date in set analysis i got the answer but i need to work with Period.
Hope you can help me.
Regards!
Is period a dual value? If so then you need to make sure that the output of your modifier is in the same format as your Period field. In set analysis you are doing string comparisons (not numeric) when using dual values.
Hi Vegar,
All my Period values are made by this formula year(Date) & if(num(month(Date))<10,'0'&num(month(Date)),num(month(Date))) so is a String Value. However, QlikView is recognizing it as a Number value but is the same value as string or number. Also, you say in set analysis we compare string so is not possible to not compare numbers??
Thank so much for you replay!
Regards
Try edit your variables like this:
Expression like this:
sum({<Period={"$(=$(vMaxPeriodAnt))"}>}[Amount])
It is a slightly different approach but the result will be as you attemptet. See attached qvf