Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
3 years ago
Solved

Cumulative Sum of String entries

Dear Community,

 

How can I make a cumulative sum of string entries by ascending date? Please see the following example (also considering blanks):

 

AS IS: 

 

TO BE:

 

 

I then create a combined line and barchart, where I show the case number per date and as a line, the cumulative case counts until the respective date on the x-axis.

 

It might be really easy, but I have been researching for days now and I am quite desperate by now.

Thank you very much in advance!

 

  • Hi, Anonymous ;

    You could try to create a measure .

    count = 
    IF(MAX('Table'[Start Date])<>BLANK(),
    CALCULATE(COUNT('Table'[Instance Name]),
    FILTER(ALL('Table'),
    
    [Start Date]&[Instance Name]<=MAX('Table'[Start Date])&MAX('Table'[Instance Name]))))

    The final show:


    Best Regards,
    Community Support Team _ Yalan Wu
    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

2 Replies

  • v-yalanwu-msft's avatar
    v-yalanwu-msft
    Icon for Community Support rankCommunity Support

    Hi, Anonymous ;

    You could try to create a measure .

    count = 
    IF(MAX('Table'[Start Date])<>BLANK(),
    CALCULATE(COUNT('Table'[Instance Name]),
    FILTER(ALL('Table'),
    
    [Start Date]&[Instance Name]<=MAX('Table'[Start Date])&MAX('Table'[Instance Name]))))

    The final show:


    Best Regards,
    Community Support Team _ Yalan Wu
    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.