Qlik Community

QlikView Layout & Visualizations

Discussion Board for collaboration on QlikView Layout & Visualizations.

Highlighted
bhaskarsharma03
Contributor

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
MVP & Luminary
MVP & Luminary

Re: Issue with Partial Sum

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
MVP
MVP

Re: Issue with Partial Sum

like this?

Capture.JPG

3 Replies
MVP & Luminary
MVP & Luminary

Re: Issue with Partial Sum

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
MVP
MVP

Re: Issue with Partial Sum

like this?

Capture.JPG

bhaskarsharma03
Contributor

Re: Issue with Partial Sum

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