Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
ALERT: QlikView server communication interruptions following Microsoft Windows Domain Controller security updates
cancel
Showing results for 
Search instead for 
Did you mean: 
neetu_singh
Partner - Creator III
Partner - Creator III

Need Help for PREVIOUS SELECTION

Hi All,

As we all know that if we need a data for "previous selection". We can achieve the same by using - sum({$1} Sales).

But in my document it is not working, am not able to get the sales for previous selection.

Can you please help me by some other way using variable or something else if $1 is not working.

Thanks in Advance.

Labels (1)
1 Solution

Accepted Solutions
tresB
Champion III
Champion III

So many triggers ! that too interdependent. Not a good approach i tempt to say. Once, you select in your year field, there are many selections(by trigger) happening inside. And that is what making it tough to trace the previous selection. After you select a value from year field, press Back (selection) and see only after nine back presses one Back works. Hence, for this app, if you use $9, it would work. but this might change if you add more triggers. So, try pressing Back and get the count when the actual works; use that number with $.

Hope this helps

View solution in original post

16 Replies
tresB
Champion III
Champion III

Not sure if there is any solution with macro for that or not. However, before exploring for that, I would prefer to investigate why $1 would not work. Is it a conscious call, or you are fade up with not finding the reason? If so, may be we too could give a try with your sample qvw that demonstrates the issue.

jsingh71
Partner - Specialist
Partner - Specialist

Can you upload sample application so its easy to investigate why $1 is not working.

neetu_singh
Partner - Creator III
Partner - Creator III
Author

Thanks for your reply.

Actually in my application ${1} is not working because of trigger as am using some trigger on a field. And we can not avoid those triggers.

Is there any other alternative to achieve the "Previous Selection".

Please find the sample file attached herewith.

tresB
Champion III
Champion III

So it is actually taking one step back/forward because of the trigger or so. You could simply use $2 in that case.

neetu_singh
Partner - Creator III
Partner - Creator III
Author

Hi Tresesco,

I tried the same, but no luck

tresB
Champion III
Champion III

Working at my end (with your sample qvw).

Mark_Little
Luminary
Luminary

HI,

Just having a play and it seem to work if you apply only( {$1} END_YEAR )  to a variable on your trigger.

See attached

Mark

neetu_singh
Partner - Creator III
Partner - Creator III
Author

In my application, there are many triggers not only one that is the reason it's not working.

Is there any other way to fix previous selection issue like variable or island table.

tresB
Champion III
Champion III

You can try setting a trigger with the same field selection like in attached sample. Note: put this set variable action on top.