Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago
Solved

How to customize the subtotal or total formular in Matrix?

Hello, I want to caculate the subtotal or total value as required, e.g., we need to caculate the margin as below formular, and is it possible to calculate the margin of subtotal/total with the formular? Thanks.

  • Hello Anonymous 

     

    What measure you have used for calculating Margin?

     

    I have used the following:

    Margin =
    DIVIDE (
        SUM ( 'Table'[Revenue] ) - SUM ( 'Table'[Cost] ),
        SUM ( 'Table'[Revenue] )
    )

     

    and it is giving me the following result:

     

    Regards,
    Vivek

    If it helps, please mark it as a solution

    Kudos would be a cherry on the top 🙂

    https://www.vivran.in/

2 Replies

  • vivran22's avatar
    vivran22
    Icon for Community Champion rankCommunity Champion

    Hello Anonymous 

     

    What measure you have used for calculating Margin?

     

    I have used the following:

    Margin =
    DIVIDE (
        SUM ( 'Table'[Revenue] ) - SUM ( 'Table'[Cost] ),
        SUM ( 'Table'[Revenue] )
    )

     

    and it is giving me the following result:

     

    Regards,
    Vivek

    If it helps, please mark it as a solution

    Kudos would be a cherry on the top 🙂

    https://www.vivran.in/

    • Anonymous's avatar
      Anonymous
      Not applicable

      vivran22It works, thank you! Need use a measure not a column, and then works.