Forum Discussion

MRadaci's avatar
MRadaci
Regular Visitor
8 years ago
Solved

Calculating Differences

Hello, 

 

Pardon my ignorance, but I am in need of some direction/assiatnce. I have a table that I need to calculate the difference of the daily_%_total by column "dialer" (has 2 values, N and U) and column "dt". 

 

Is this possible within Power BI? I have tried filtering, grouping as well as allexcept without any success.

 

Source table:

 

 

 

 

 

 

 

 

Desired Result:

 

 

 

 

 

 

 

 

 

Any assitance is greatly appreciated. 

  • Anonymous's avatar
    Anonymous
    8 years ago

    Hi MRadaci,

     

    You can try to use below formula to show diff on total level.

    Diff =
    IF (
        ISFILTERED ( Sheet1[system] ),
        SUM ( Sheet1[daily_%_total] ),
        CALCULATE ( SUM ( Sheet1[daily_%_total] ), Sheet1[system] = "N" )
            - CALCULATE ( SUM ( Sheet1[daily_%_total] ), Sheet1[system] = "U" )
    )
    

     

    Regards,
    Xiaoxin Sheng

4 Replies

      • Anonymous's avatar
        Anonymous
        Not applicable

        Hi MRadaci,

         

        You can try to use below formula to show diff on total level.

        Diff =
        IF (
            ISFILTERED ( Sheet1[system] ),
            SUM ( Sheet1[daily_%_total] ),
            CALCULATE ( SUM ( Sheet1[daily_%_total] ), Sheet1[system] = "N" )
                - CALCULATE ( SUM ( Sheet1[daily_%_total] ), Sheet1[system] = "U" )
        )
        

         

        Regards,
        Xiaoxin Sheng