Forum Discussion

Spartanos's avatar
Spartanos
Icon for Helper II rankHelper II
4 years ago
Solved

Sumif in DAX

I want to make an easy sumif calulation with summing the sum of tracking numbers (text format). I also want to add a filter  with only rows which contain the currency euro. tracking             net_...
  • AilleryO's avatar
    AilleryO
    4 years ago

    Hi,

     

    So it should work with :

    Sum_if = 
    VAR CurrentTrackingNum=SELECTEDVALUE( 'Append'[Tracking Nr] )
    RETURN
    
    CALCULATE( SUM('Append'[Charge Net]),'Append'[Tracking Nr]=CurrentTrackingNum)

     

    or you can use SUMMARIZE :

    Create measure

    Tot Net = SUM( [Charge Net] )

    then :

    Tot by Track Num =
    SUMMARIZECOLUMNS( [Tracking Nr] , "Name of new column", [Tot Net] )

     

    Tell us what's best for you