Forum Discussion

fpavan76's avatar
fpavan76
Regular Visitor
9 years ago
Solved

IF condition in Grand Total

Hi to all,

i have a question 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 

  • Anonymous's avatar
    Anonymous
    9 years ago

    You can create a new measure (not column) using DAX as follows:

     

    Measure = IF(SUM(Data[A])+SUM(Data[B])>SUM(Data[C]);SUM(Data[A])+SUM(Data[B]);0)

1 Reply

  • Anonymous's avatar
    Anonymous
    Not applicable

    You can create a new measure (not column) using DAX as follows:

     

    Measure = IF(SUM(Data[A])+SUM(Data[B])>SUM(Data[C]);SUM(Data[A])+SUM(Data[B]);0)