Forum Discussion

amelia's avatar
02-02-2022
Solved

Contribution function returning wrong values

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 

  • 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)

2 Replies

Replies have been turned off for this discussion
  • 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)