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

Announcements
Join us in Toronto Sept 9th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

The question of using Set analysis in Dimension

I have a testing table as below.

Test:

Load * inline

[id,amt

1,10

1,20

1,30

2,10

2,20

2,30];

I would like to show all the IDs in the object always, although the ID is filtered in the selection.

I created a straight table as following, but it not work. it only show the id which filter by ID in the selection, but I would like to show all the IDs.

dimension:

=aggr(MaxString({1<id=>} id),id)

expression:

sum(amt)

could you please help me?

thanks a lot.

5 Replies
Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

You can add an expression sum({<id=>}1) to the straight table. You can then hide that expression. See attached example.


talk is cheap, supply exceeds demand
swuehl
MVP
MVP

Have you tried using set analysis in the expression?

id

as dimension

sum({1} amt)

as expression

Anonymous
Not applicable
Author

You can use id as dimension, not a calculated dimension - and check "show all values".

But this is not enough.  You have also take care of expressions.  Try to uncheck "suppress zero values" and "supress missing".

Regards,

Michael

Not applicable
Author

Thanks for your help guys, but I think I did not explain chear. the expreesions are so complex in my actual case, so your suggestions are not suit to my situation.

I confused that why the Set analysis is not work in the Dimension.

for my exsample below, if I would like to show ID 1 and 2 always, how to set? Thanks.

Test:

Load * inline

[id,amt

1,10

1,20

1,30

2,10

2,20

2,30

3,10

3,20];

kaushiknsolanki
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi,

     Create a straight table with dimension as ID

     and expression as

     Sum({1<ID = {"1","2"}>}amt)

Regards,

Kaushik Solanki

Please remember to hit the 'Like' button and for helpful answers and resolutions, click on the 'Accept As Solution' button. Cheers!