Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
beunderf
Partner - Creator II
Partner - Creator II

Percentage of a subset

I have the following data:

DayLineType productNumber
11ACard5
21ACard6
11ACash4
21ACash2
11AOther8
21AOther10
12ACard6
22ACard6
12ACash8
22ACash2
12AOther4
22AOther10

I want to create the following Chart:

LineTypeProductTotalAverage (per day)Product segregation(per line)
1ACard115,531%
1ACash6317%
1AOther18951%
TOTAL:35100%
2ACard12633%
2ACash10528%
2AOther14739%
TOTAL:36100%

My problem is that I dont know how create a expression for the 'Product segragation' part.

The 31% should be calculated the following way:

Sum(numbers of  line 1, type A, product Card) / SUM (numbers of Line 1, type A)

In numbers:

      11 / 35 = 31%

Can anyone help me?

Thanks in advance

Frank

1 Solution

Accepted Solutions
nagaiank
Specialist III
Specialist III

Change the expression for the segregation to Sum(Number)/Sum(TOTAL<Line> Number)

The modfified qvw file is attached.

View solution in original post

2 Replies
nagaiank
Specialist III
Specialist III

Change the expression for the segregation to Sum(Number)/Sum(TOTAL<Line> Number)

The modfified qvw file is attached.

beunderf
Partner - Creator II
Partner - Creator II
Author

Thanks for the quick response!