Skip to main content
Announcements
NEW: Seamless Public Data Sharing with Qlik's New Anonymous Access Capability: TELL ME MORE!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

simple question

hi guys..

Please look at the following example.

Every "version" has its own "hour" and "description"

I want that not matter what selection are made the user will see all the "hours" and "description".

I tried to use set analysis but couldn't make it.

any ideas??

1 Solution

Accepted Solutions
johnw
Champion III
Champion III

Replace sum({1}1) with sum({<version={"<=$(=max(version))"}>}1).

You could write anything in the sum. Heck, you could write if(count({<version={"<=$(=max(version))"}>} 'Apple Pie')>0,'Cherry Pie'). The point is to just get a null vs. non-null value in the column. QlikView won't let us write a set analysis expression without doing an aggregation, so we're just inventing an unrelated aggregation so that we can use set analysis.

View solution in original post

8 Replies
Not applicable
Author

hello,

check attached example.

cheers

karol

disqr_rm
Partner - Specialist III
Partner - Specialist III

Hi Karol,

Nice little trick.

eiconsulting
Partner - Creator
Partner - Creator

Try adding a fictitious value field to yr data (all 1s) and show hour and descr in a graph (table) with the expression below. I tried and it works, am not sure it is exactly what you want.

Flavio

=sum({1}value)

Federico Sason | Emanuele Briscolini
Not applicable
Author

Very nice! Its working!

Now I realize that I need something a bit more sophisticated....

I need that with every selection of version the "hour" and "description" will be all the previous

versions , i.e selecting version "2" will show the values of "hour" and "description for version 1 and 2,

selecting version "3" will show the values of "hour" and "description for version 1 and 2 and 3 etc'

p.s.

Putting {1} in the expression means (correct me if I'm wrong) taht all values will show.

Why writing 1 in the sum? if I'm writing 2 everything is the same....what do I miss?

Not applicable
Author

Someone....?

johnw
Champion III
Champion III

Replace sum({1}1) with sum({<version={"<=$(=max(version))"}>}1).

You could write anything in the sum. Heck, you could write if(count({<version={"<=$(=max(version))"}>} 'Apple Pie')>0,'Cherry Pie'). The point is to just get a null vs. non-null value in the column. QlikView won't let us write a set analysis expression without doing an aggregation, so we're just inventing an unrelated aggregation so that we can use set analysis.

Not applicable
Author

... and if you are wondering why John used max() function, it is to make sure that chart works when you do not have any version selected (then you jest take the max of version) OR you have more than one version selected (maybe consider to allow only one selection in the version?).

if you have only one version selected then this expr will also work sum({<version={"<=$(=version)"}>}1)

Not applicable
Author

Yes

great ! its working and doing exactly what I meant.

Thanks for the explanations.