Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Comparing groups of records within a table

Hi,

Please take a look at this sample application. What I did here was to load my main table (Fruits). Then create two separate identical tables from it in the load script. This way I could then have two identical, but disjoint list boxes of all fruits. Here the user can pick a fruit (or group of fruits) from each one of these two list boxes and the table to the right will compare the average count of the selected fruits from each list box.

My question is this. Can one accomplish this functionality without creating two copies of the original table. My real table has millions of rows and this is not an optimum solution.

1 Solution

Accepted Solutions
Not applicable
Author

Perfect. Thanks for your help. Can you explain the $* notation in the expression? Does not look like the set analysis syntax I have seen before:

avg({$*A} [Count])

View solution in original post

10 Replies
crusader_
Partner - Specialist
Partner - Specialist

Hi,

Alternate States is solution for your issue.

Read more here How to Comparative Analysis.

PFA.

Hope this helps you.

Andrei

demoustier
Creator
Creator

Like in attached File ?

Not applicable
Author


I see now how the Alternate States feature works; however, my requirements are to implement it exactly as in the straight table in my original sample qvw file. Can't seem to be doable with Alternate States.

demoustier
Creator
Creator

In this case, I have no other solution than yours....sorry

crusader_
Partner - Specialist
Partner - Specialist

Hi,

Check wether it acceptable for you2014-09-23_comm134496.png.

PFA.

Hope this helps.

Andrei

Not applicable
Author

Perfect. Thanks for your help. Can you explain the $* notation in the expression? Does not look like the set analysis syntax I have seen before:

avg({$*A} [Count])

crusader_
Partner - Specialist
Partner - Specialist

Hi,

It's Alternate State syntax in set analysis.

$*A means Selection and State 'A' - intersection give us correct result.

Hope this helps you.

PS please mark my previous answer (correct or helpful) for future users who will have same issue.

Andrei

Not applicable
Author

i just notice that another non alternate state list is interfering with my two alternate list boxes.If I have a  third non-alternate state Fruit list box in the app, it affects what the user selects from the alternate state lists. I tried every syntax I could think or researched, but nothing seems to work. Do you know how to include all elements from this list box in the expression, ie, {<Fruit=>}

crusader_
Partner - Specialist
Partner - Specialist

Oh, yes... Sorry for this confusion.

I've never faced it before because I haven't used "third" listbox.

To fix this remove $-sign.

avg({A} [Count])

avg({B} [Count])


Regards,

Andrei