Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
5 years ago
Solved

CUMULATIVE FOR EMAIL

Here is my Data

EmailDateCount
Dan at abc.xyz7/1/202018
Roxy at abc.xyz7/1/202020
Sam at abc.xyz7/1/202022
Dan at abc.xyz8/1/202030
Roxy at abc.xyz8/1/202040
Sam at abc.xyz8/1/202050

 

I am trying to calculate this in POWERBI

 

dan4848
roxy60108
sam72180

 

I am able to get the counts to work easily by calculation for cumulative is not working 

 

Calculate(sum([count]), filter(all(table),table[email]<=max(table[email])))

  • Hi Anonymous ,

     

    Please check:

    cumulative count =
    CALCULATE (
        SUM ( 'Table'[Count] ),
        FILTER ( ALL ( 'Table' ), 'Table'[Email] <= MAX ( 'Table'[Email] ) )
    )
    

     

    Best Regards,

    Icey

     

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

3 Replies

  • smpa01's avatar
    smpa01
    Community Champion

    Anonymous 

     

    _sumCount:= SUMX('Table 1','Table 1'[Count])
    
    _cumulativeTotal:= 
    VAR _1 = MAX('Table 1'[Date])
    VAR _2 = CALCULATE([_sumCount],ALL('Table 1'[Date]),'Table 1'[Date]<=_1)
    RETURN _2
    • smpa01's avatar
      smpa01
      Community Champion

      Anonymousdid you try the above ?

  • Icey's avatar
    Icey
    Community Support

    Hi Anonymous ,

     

    Please check:

    cumulative count =
    CALCULATE (
        SUM ( 'Table'[Count] ),
        FILTER ( ALL ( 'Table' ), 'Table'[Email] <= MAX ( 'Table'[Email] ) )
    )
    

     

    Best Regards,

    Icey

     

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.