Forum Discussion

DeepakJha23's avatar
DeepakJha23
Helper I
5 years ago
Solved

Cumulative Count by Week

Hi Power BI Users,

 

I am having an issue with Cumulative Count by week. Here is the sample data i am working on : 

 

Sample Data

This shows the tickets opened on a date and its corresponding week_number.

 

We want to plot the data on the weeknum level with Cumulative count like this : 

 

Output1

Any help would be deeply appreciated.

 

Thanks,

 

 

Greg_Deckler mahoneypat edhans 

  • DeepakJha23 - You could create a measure like this:

    Cumulative Count =
      VAR __Week = MAX('Table'[Week_Num(Date)])
    RETURN
      SUMX(FILTER('Table',[Week_Num(Date)]<=__Week),[TicketCount])
    
  • Hello @DeepakJha23

    here's my solution. It is very closed to @Greg_Deckler solution:

    02-09-_2020_13-26-14.png

    Sum of Ticket Count = SUM('Table'[Ticket Count])
    
    Cumulative Count = 
    CALCULATE(
        [Sum of Ticket Count],
        FILTER(
            ALL('Table'),
            'Table'[Week_Num(Date)] <= MAX('Table'[Week_Num(Date)])
        )
    )

    With kind greetings from the city where the legend of the 'Pied Piper de Hamelin' is at home
    FrankAT (Proud to be a Datanaut)

3 Replies