cancel
Showing results for 
Search instead for 
Did you mean: 

Contribution function returning wrong values

amelia
10 - ETL
10 - ETL

Hi all, as seen in the screenshot, I would like to get percentage values for each cell based on the grand total. However, when I use Contribution(), it returns the percentage relative to the total per column. I would like to get the total based on the table, rather than each column. Can anyone advise? Thank you 

1 ACCEPTED SOLUTION

irismaessen
11 - Data Pipeline
11 - Data Pipeline

You can always calculate the contribution yourself, especially if the formula you are using is not too complicated.

Including the ALL(columname) as a filter on your formula means that all values from that column will be considered in the calculation. So you can use that to calculate a contribution.

For instance: SUM(sales)/(SUM(sales), ALL(Months in Date)) will calculate the percentage of Sales in a given month over all months.

For your situation, you can apply the ALL() filter for both your Rows grouping and your Columns grouping.

So  your Values formula becomes something like: SUM(Sales)/(SUM(Sales), ALL(YourRows), ALL(YourColumns)

View solution in original post

2 REPLIES 2

irismaessen
11 - Data Pipeline
11 - Data Pipeline

You can always calculate the contribution yourself, especially if the formula you are using is not too complicated.

Including the ALL(columname) as a filter on your formula means that all values from that column will be considered in the calculation. So you can use that to calculate a contribution.

For instance: SUM(sales)/(SUM(sales), ALL(Months in Date)) will calculate the percentage of Sales in a given month over all months.

For your situation, you can apply the ALL() filter for both your Rows grouping and your Columns grouping.

So  your Values formula becomes something like: SUM(Sales)/(SUM(Sales), ALL(YourRows), ALL(YourColumns)

amelia
10 - ETL
10 - ETL

Thanks so much, it helps 🙂