Forum Discussion

fpavan76's avatar
fpavan76
Regular Visitor
9 years ago

Calculate Grand Total with Conditional

Hi to all,
I need a suggest about a measure to calculate grand total with particular condition.

I have 3 columns A, B and C
I want insert this condition:
IF A+B > C then A+B else 0

This formula work correclty in the table rows but not work in Grand Total .
May you help me to solved this issue?

 

Thanks in advance

Franco

16 Replies

  • Hi fpavan76,

     

    Just add this Measure to you data:

     

    Measure=
         IF (
             SUM ( Table1[A] ) + SUM ( Table1[B] )
                 > SUM ( Table1[C] ),
             SUM ( Table1[A] ) + SUM ( Table1[B] ),
            0
         )

     

    Regards,

    MFelix

    • fpavan76's avatar
      fpavan76
      Regular Visitor

      Hi MFelix

      thanks for your help but I would obtain in line Total the effective sum of table rows..
      Do you have any idea?

      I've attach an example, in line Total of measure I would like see the sum of rows (1.041)

      thanks in advance

       

      Regards,

      Franco

       

       

       

      • MFelix's avatar
        MFelix
        Super User

        Is your A + B + C columns a sum of several values or are they individual values in a table? you can add it as a column instead of a measure.

         

        Regards,

        MFelix

  • v-jiascu-msft's avatar
    v-jiascu-msft
    Microsoft Employee

    Hi fpavan76,

     

    Could you please mark the proper answer if it's convenient for you? That will be a help to others.

     

    Best Regards!
    Dale