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

Announcements
Learn how to migrate to Qlik Cloud Analytics™: On-Demand Briefing!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Split Sales Using Total In Set Analysis

I have a data set as given below.

      

IDProductYearSemesterSalesTarget
1-20131H100-
1-20141H100-
1-20151H100-
2-20132H100-
2-20142H100-
2-20152H100-
-X20131H-90
-X20141H-90
-X20151H-90
-Y20131H-100
-Y20141H-200
-Y20151H-120
-X20132H-90
-X20142H-90
-X20152H-90
-Y20132H-150
-Y20142H-250
-Y20152H-140

I want to show it in the below format. But the values are not as expected. Targets should be only for product Y and split according to the Year-Semester. Currently is show sum of all targets for product Y. I am using the expression sum({<Product={'Y'}>}total distinct Target)

 

Year201320132013201320142014201420142015201520152015
Semester1H1H2H2H1H1H2H2H1H1H2H2H
IDSalesTargetSalesTargetSalesTargetSalesTargetSalesTargetSalesTarget
1100960096010096009601009600960
2096010096009601009600960100960
-096009600960096009600960
3 Replies
sunny_talwar

Do you have an application where the data is already loaded into the application to play around with it?

marcus_sommer

Should your expression not look like that: sum({<Product={'Y'}>} Target) without total and distinct?

- Marcus

sunny_talwar

Or this:

sum({<Product={'Y'}>}total <Semester, Year> distinct Target)

Capture.PNG