locked
Calculating a percentage measure RRS feed

  • Question

  • Hi,

    I need to determine the DAX expression to calculate the percentage respect two measures, Invoices1 and Invoices2. My PowerPivot Pivot table is composed of Categories and Products as rows and of two measures, Invoices1 and Invoices2. I need to calculate this percentage as Invoices1/(Invoices1 + Invoices2). When I put Categories and Products as rows an authomatic grouping is created. For the subtotal for each category, the percentage not must be the sum of the percentages calculated for each product row in the category group.

    Any helps to me, please?

    Thanks

    Thursday, March 29, 2012 1:01 PM

Answers

  •  For the subtotal for each category, the percentage not must be the sum of the percentages calculated for each product row in the category group.

    Why do you think the subtotal will be the sum of the percentages?

    Keep in mind that each cell is evaluated in its own context. It doesn't look at other cells in the PT. Therefore the subtotal cell will follow the same formula (i.e. Invoices1/(Invoices1 + Invoices2) ) as the rest of the cells, it will just use the aggregated values of Invoices1 & Invoices2.

    • Marked as answer by Challen Fu Sunday, April 8, 2012 12:39 PM
    Thursday, March 29, 2012 4:34 PM