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

Announcements
Independent validation for trusted, AI-ready data integration. See why IDC named Qlik a Leader: Read the Excerpt!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Set analysis with $1

Hi

I want to use $1 on one dimension.

This works

Sum({$< Aktiv = , Sammenlignelig = , Kjede = , Periode = >} Sales)

Should it be possible to write something like

Sum({$1< Marked >} Sales)



Regards

Jerrik



3 Replies
manishkumar75
Partner - Creator II
Partner - Creator II

Hi,

$1 represents the previous selection, i.e. equivalent to pressing the Back button.

Sum ({$1} Sales) , returns sales for the previous selection.

- Manish

johnw
Champion III
Champion III

While I have no idea how you would use it, and while the format is very ugly, I have come up with a way to say that you want the current selections for all fields except for a specific field, for which you want the previous selection. In the example file, I have four fields. Here's how I do what I think you want:

sum({$1<Type ={$(=concat(distinct Type ,','))}

Class={$(=concat(distinct Class,','))}

Sales={$(=concat(distinct Sales,','))}>}Sales)

Probably not a good idea in practice, but it was an interesting exercise.

Not applicable
Author

Hi John,

Thx for trying. The code doesnt give me the answer I was looking for.

I have modified your excampel a bit, to explain.

In text I want to have current selection for Type and Class, but previous selection for Marked. Like Sum( {$1}<Marked> <{$]Type,Class>}Sales) whitch does not work, and of course without having to type all $-Fields.