Skip to main content
Announcements
Marching toward a simplified navigation! READ ON
cancel
Showing results for
Search instead for
Did you mean:
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%)

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)

• ### partial sum

2 Solutions

Accepted Solutions
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

like this?

3 Replies
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

like this?

Creator
Author

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

Community Browser