Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello everybody,
I have a silly problem about Set Analysis that I wasn't able to solve reading all the manuals and examples I found on internet.
I need to compare a field to a variable inside the modifier.
I have Pax associated to some IDs. I want the Sum of Pax for only a specific ID, contained in the variable vID1 (it is the latest ID obtained with the function rank, but I tested and it works)
Sum ({$<ID={"$(vID1)"}>} Pax)
Probably I am doing a mistake in the sintax, but I can't understand where!
Thanks!
Matt
Hi Mohammed,
the reason is that I need to compare the last ID with the previous one (or the previous 2 or 3).
Since the ID are not consequent (there are some missing, eg: 1, 3, 8, 9, 10, 15. No pattern at all) the rank function is the only solution I found to my problem.
The variable seems to work in the straight table, or in the textbox, but not in the formula.
Thanks
Matt
Hi,
Use this as Rank formula
vIdMax :::::::: Rank(Sum(PAX))
Dimension :: ID
Expression :: =$(vIdMax)
If you are not expecting this, come up with an example.
Regards,
Jagan.
Hi,
If you want to compare previous row in chart try Above(), refer Qlikview help file for detailed help.
Regards,
Jagan.
Hi Jagan,
thanks for the reply.
I need to rank according to the ID (the higher, the most recent), not to rank according to pax. I sent a qlikview few post above, I'm still stuck at that point
Thanks
Matt
Hi,
Try this expression
=Rank(-ID)
Regards,
Jagan.
Hi Jagan,
I used the expression Rank (ID).
With the minus it only changes the order, but the problem remains.
Thanks
Matt