Forum Discussion

Vaneet05's avatar
Vaneet05
Helper I
4 years ago

Modification in Grand Total

Dear All,

 

In my workbook, there is one sheet it contains one table with the column FY 2022-23 Price Erosion which depends on the other two columns  FY 2022-23 ASP and FY 2021-22 ASP . Logically it gives me the correct answer item wise and the grand total also comes right as per logic in the formula. But I want the sum of FY 2022-23 Price Erosion in the grand total instead of the value coming which is logically correct as per the formula.

 

FY 2022-23 Price Erosion = CALCULATE(IF([Actual quantity 2022-23]>0,([FY 2022-23 ASP]-[FY 2021-22 ASP])*[Actual quantity 2022-23],([FY 2022-23 ASP]-[FY 2021-22 ASP])*[Actual quantity 2021-22]))

 

 

2 Replies

  • Vaneet05 , Try like

    FY 2022-23 Price Erosion =Sumx(Values( Table[Name]) , CALCULATE(IF([Actual quantity 2022-23]>0,([FY 2022-23 ASP]-[FY 2021-22 ASP])*[Actual quantity 2022-23],([FY 2022-23 ASP]-[FY 2021-22 ASP])*[Actual quantity 2021-22])) )

     

    Use correct table name for Name

    • Vaneet05's avatar
      Vaneet05
      Helper I

      Not giving me the correct output.

       

      Before changing the formula. output is given below:

       

      After changing the formula output is given below:

      It's changing the value item wise also which is incorrect and the grand total is also not coming correctly.

      I want item value should work as before but the only grand total should come as the sum of the price erosion column.