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

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

Help with Set analysis!

Hi to all,

I'm new to the QV Community and I need help with set analysis!

I need to have a pivot table like this that calculate the % of the sales for each month for each year for each country:

Eg data is this:

DateCountrySales
11/01/2014USA100
22/05/2014USA400
21/06/2014USA500
01/05/2015USA300
22/06/2015USA700
15/01/2014UK4500
22/10/2014UK5500
14/04/2015UK8500
18/05/2015UK1500

I calculated field year and month in the script with a master calendar.

I need to have the pivot table like this if I select Year 2014:

MonthUSAUK
Jan10,00%45,00%
May40,00%0,00%
Jun50,00%0,00%
Oct0,00%55,00%

My problem that I have many problem with set analysis syntax.

I dont know how can I calculate the % of the sum of the month in the year (eg 2014 USA total sales is 1.000 and UK is 10.000, so I need to do eg. total USA Jan 2014/Totale USA 2014).

Which is the set analysis?

Please can you help me?

Thank you!

Best regards.

1 Solution

Accepted Solutions
sunny_talwar

This?

Capture.PNG

PFA

Best,

Sunny

View solution in original post

5 Replies
sunny_talwar

This?

Capture.PNG

PFA

Best,

Sunny

nsm1234567
Creator II
Creator II

Hi There,

If I understand your question correctly, you don't need set analysis to accomplish what you're looking for.  Could you try an expression as follows:

=Sum(Sales)/Sum(TOTAL <Country> Sales)

spsrk_84
Creator III
Creator III

Hi ,

Please see the attached file. Hope the solution i provided is what you are expecting.

No need of set analysis in this case , Check & let me know of any issues.

Thanks,

Shiva !

Not applicable
Author

Hi,

This will help you!!

Thanks,

Shekar!!

Not applicable
Author

Hi,

thank you to all!

Best regards.