Forum Discussion

Vinothsusai's avatar
Vinothsusai
Icon for Helper III rankHelper III
7 years ago
Solved

Calculate 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...
  • v-juanli-msft's avatar
    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
    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.