Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago
Solved

Cumulative line chart with multiple lines

Currently i have the following graph. It shows the count of registrations (attendeeids) on a specific datediff (the difference in dates between the registration date of the attendee and the start of the event) for both events in the database.

However, i would prefer to have a line chart which shows the cumulative amount of registrations over the period of 182 days. (ultimately reaching the total amount of registrations at day 182) for both events with the possibility of more events in the future.

 

(here is also a sample of the attendee table with randomly generated test data if needed)

 

 

Thank you in advance, 

Dries Wambacq

  • Hi Anonymous ,

     

    I'm assuming you are placing the datediff column on you x-axis you need to create the following measure:

     

    CUMULATIVE COUNT =
    CALCULATE (
        COUNT ( 'Table'[Atendee] );
        FILTER (
            ALLSELECTED ( 'Table'[DateDiff] );
            'Table'[Datediff] <= MAX ( 'Table'[Datediff] )
        )
    )

     

    This should give expected result.

2 Replies

  • Hi Anonymous ,

     

    I'm assuming you are placing the datediff column on you x-axis you need to create the following measure:

     

    CUMULATIVE COUNT =
    CALCULATE (
        COUNT ( 'Table'[Atendee] );
        FILTER (
            ALLSELECTED ( 'Table'[DateDiff] );
            'Table'[Datediff] <= MAX ( 'Table'[Datediff] )
        )
    )

     

    This should give expected result.