Qlik Community

Ask a Question

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
QlikView forum consolidation is complete. Labels are now required. LEARN ABOUT LABELS
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

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

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

Can you provide solution for both if possible?

Gysbert_Wassenaar

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

alexpanjhc
Specialist
Specialist

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

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