Forum Discussion
fpavan76
9 years agoRegular Visitor
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 ...
MFelix
9 years agoSuper User
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
- fpavan769 years agoRegular 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
- MFelix9 years agoSuper 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
- fpavan769 years agoRegular Visitor
A,B and C are a measures sum of several values.
for example:
A= CALCULATE ( SUM( Table1[A1] ); FILTER ( DimDates;DimDates[Date] ) )If I add a tabel column I don't think obtain Grand Total a correct result..
thanks in advance
Franco