Forum Discussion
Vinothsusai
Helper III
7 years agoCalculate total value based on the formula with the same aggreagated total column
Hi, I am using a measure to find the total amount based on the formula in the table below.Here I have a doubt how can i calculate formula with the same aggreagated column amount. Could you please ad...
- 7 years ago
Hi Vinothsusai
you could apply it in specific rows.
Measure 2 = VAR maxf = MAX ( Table1[ReportLayout.Formula] ) RETURN IF ( maxf = BLANK (), SUM ( Table1[Amount] ), CALCULATE ( SUM ( Table1[Amount] ), FILTER ( ALL ( Table1 ), CONTAINSSTRING ( maxf, "D" & [Line ID] & "|" ) ) ) ) Measure 3 = VAR maxf = MAX ( Table1[ReportLayout.Formula] ) RETURN IF ( MAX ( Table1[Line ID] ) <> 25, [Measure 2], SUMX ( FILTER ( ALL ( Table1 ), CONTAINSSTRING ( maxf, "D" & [Line ID] & "|" ) ), [Measure 2] ) )Best Regards
MaggieCommunity Support Team _ Maggie Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
v-juanli-msft
Community Support
7 years agoHi Vinothsusai
you could apply it in specific rows.
Measure 2 =
VAR maxf =
MAX ( Table1[ReportLayout.Formula] )
RETURN
IF (
maxf = BLANK (),
SUM ( Table1[Amount] ),
CALCULATE (
SUM ( Table1[Amount] ),
FILTER ( ALL ( Table1 ), CONTAINSSTRING ( maxf, "D" & [Line ID] & "|" ) )
)
)
Measure 3 =
VAR maxf =
MAX ( Table1[ReportLayout.Formula] )
RETURN
IF (
MAX ( Table1[Line ID] ) <> 25,
[Measure 2],
SUMX (
FILTER ( ALL ( Table1 ), CONTAINSSTRING ( maxf, "D" & [Line ID] & "|" ) ),
[Measure 2]
)
)
Best Regards
Maggie
Community Support Team _ Maggie Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Vinothsusai
Helper III
7 years agoThank you. It works.