Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
Anonymous
Not applicable

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.

Line chart.png

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)

 

test data.png

 

Thank you in advance, 

Dries Wambacq

1 ACCEPTED SOLUTION
MFelix
Super User
Super User

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.


Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português



View solution in original post

2 REPLIES 2
amitchandak
Super User
Super User

I think for 182 days. Other than above formula you might have filter 182 dates either at visual level using relative option or relative date filter

https://docs.microsoft.com/en-us/power-bi/visuals/desktop-slicer-filter-date-range

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube
MFelix
Super User
Super User

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.


Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português



Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors