Forum Discussion

cristianml's avatar
cristianml
Icon for Post Prodigy rankPost Prodigy
7 years ago
Solved

Dax formula calculate Difference cumulative

Hi,   I need to replicate the following formula as a measure for PBI :  Column D (Acumulative) + Column C - Column B How can I calculate this?   Thanks,
  • v-cherch-msft's avatar
    7 years ago

    Hi cristianml 

    You may try below measure:

    Measure =
    IF (
        MAX ( Table1[A] ) = BLANK (),
        SUM ( Table2[D] ),
        CALCULATE (
            SUM ( Table2[D] ) + SUM ( Table1[C] )
                - SUM ( Table1[B] ),
            FILTER ( ALL ( Table1 ), Table1[A] <= MAX ( Table1[A] ) )
        )
    )
    

    Regards,