Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi everyone, i'm new to qliksense and would appreciate some guidance on the following expression and error.
in a straight table, I have columns for current and previous rank for various products and I need to calculate the difference between the current rank and the previous rank and ended up "Zero" or "-"
Tried below expressions
Current Rank = {<period={'FY23}>}w_rank
Previous Rank = {<period={'FY22}>}w_rank
1. Rank Diff = {<period={'FY23}>}w_rank - {<period={'FY22}>}w_rank (Ended up with "-")
2. Rank Diff = MAX({<period={'FY23}>} w_rank) - MAX({<period={'FY22}>} w_rank) (Ended up with "-")
3. Rank Diff = Alt(Max(Column1),0)- Alt(Max(Column2),0) (Ended up with 0)
could some one please shed some light on the issue?
Hi @jagdishbr ,
well, first thing I see, you are missing the apostrophe:
= {<period={'FY23'}>}w_rank
Second, I would suggest you to create some master measures, like for Current Rank and Previous Rank, this way you can recall them whenever you want and, in your table, subtract Current Rank from Previous Rank.
Third, if there is a field with dates, instead of using the flags FY23 and FY22, you can use some variables to make it update dinamically.
Hope this can help you