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

Announcements
Qlik Connect 2026 Agenda Now Available: Explore Sessions
cancel
Showing results for 
Search instead for 
Did you mean: 
alexpanjhc
Specialist
Specialist

Set Analysis or else?

Hi
I am trying to compare the following information
where on the same day, if Type A's Amount is greater than TypeB's Amount
Do i do it in set analysis or do i change the load structure?
Please help thanks!
TypesAmountDate
A2010/2/2012
B2510/2/2012
A5010/3/2012
B4010/3/2012
A3010/4/2012
B6010/4/2012
1 Solution

Accepted Solutions
Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

A table with Date as dimension and an expression like sum({<Types='{A}'>}Amount)-sum({<Types='{B}'>}Amount) would give you a table with the difference between A and B per date.

For a load script example see attached qvw.


talk is cheap, supply exceeds demand

View solution in original post

5 Replies
Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

That depends on what you need to do. If you need that comparison very often (in lots of charts) it would make sense to create the difference between A and B per date in the load script. Otherwise set expression will do fine.


talk is cheap, supply exceeds demand
alexpanjhc
Specialist
Specialist
Author

Can you provide solution for both if possible?

Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

A table with Date as dimension and an expression like sum({<Types='{A}'>}Amount)-sum({<Types='{B}'>}Amount) would give you a table with the difference between A and B per date.

For a load script example see attached qvw.


talk is cheap, supply exceeds demand
alexpanjhc
Specialist
Specialist
Author

the set analysis is good, but I'd like to know how many days the amount of Type A is greater than Type B.

alexpanjhc
Specialist
Specialist
Author

never mind, I misread what you said... sorry and thanks!