Skip to main content
Announcements
Live today at 11 AM ET. Get your questions about Qlik Connect answered, or just listen in. SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
bhaskarsharma03
Creator
Creator

Issue with Partial Sum

Hi,

I am trying to add a simple expression where result of a previous column is divided by partial sum of the column based on a dimension.

As shown below, the column 6 is calculated by dividing the value in column 5 by sum total of the values in column 5 for the respective month.

For example - the total for the month of January in column 5 is 190.9% (54.5% + 81.8% + 54.5%). Therefore, the corresponding values in the column 6 for each of the suppliers should be:

Supplier1 = 28.6%    (54.5% / 190.9%)

Supplier2 = 42.9%    (81.8% / 190.9%)

Supplier3 = 28.6%    (54.5% / 190.9%)Capture.JPG

Could anyone please help me calculate the column 6!

The result eventually needs to be used in a line chart with Month and Supplier as dimensions. The application is attached herewith.

Thanks & Regards,

Bhaskar

 

Labels (2)
2 Solutions

Accepted Solutions
Gysbert_Wassenaar

Try this expression:
Count(DISTINCT Dealer)/Count(TOTAL <Month> DISTINCT Dealer)/
sum(total <Month> aggr(Count(DISTINCT Dealer)/Count(TOTAL <Month> DISTINCT Dealer),Month,Supplier))


talk is cheap, supply exceeds demand

View solution in original post

tresesco
MVP
MVP

3 Replies
Gysbert_Wassenaar

Try this expression:
Count(DISTINCT Dealer)/Count(TOTAL <Month> DISTINCT Dealer)/
sum(total <Month> aggr(Count(DISTINCT Dealer)/Count(TOTAL <Month> DISTINCT Dealer),Month,Supplier))


talk is cheap, supply exceeds demand
tresesco
MVP
MVP

like this?

Capture.JPG

bhaskarsharma03
Creator
Creator
Author

Thank you very much... exactly what I was looking for 🙂