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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Reply
LaurensM
Regular Visitor

Power BI running total with counting rows by date order

I have this file which contains participant ID's in column A and their registration date in column B in 'Sheet1', ordered in random date order. I want to make a graph in power BI that shows the cumulative number of registrations on a certain day. I've looked to previous posts, but don't really know where to start (except that I probably need the count rows function). Could someone help me out?

1 ACCEPTED SOLUTION

UPDATE

 

I fixed it with creating a measure with the following code

 

Registrations =
CALCULATE (COUNTROWS('Data'),
    FILTER (
        ALL ('Data'),
        'Data'[Registration date] <= MAX('Data'[Registration date])
    )
)

View solution in original post

3 REPLIES 3
v-yangliu-msft
Community Support
Community Support

Hi  @LaurensM ,

I created some data:

vyangliumsft_0-1683520051326.png

Here are the steps you can follow:

1. In Power Query -- Add Column – Index Column – From 1.

vyangliumsft_1-1683520051329.png

2. Create measure.

Measure =
SUMX(
    FILTER(ALLSELECTED('Table'),
    'Table'[registration date]=MAX('Table'[registration date])&&'Table'[Index]<=MAX('Table'[Index])),[Value])

 3. Result:

vyangliumsft_2-1683520082683.png

If I have misunderstood your meaning, please provide your pbix file without privacy information and desired output.

 

Best Regards,

Liu Yang

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

Hi Liu,

 

Thanks for your response! I tried your method, but it unfortunately did not give the desired outcome. I attached my simplified data source and pbix file in a wetransfer link here. My final goal is to create a linegraph that shows the total number of registrations up until a specific day. (For example if over the past week each day 3 persons registered, on day 7 the graph shows 7 x 3 = 21 registrations.

UPDATE

 

I fixed it with creating a measure with the following code

 

Registrations =
CALCULATE (COUNTROWS('Data'),
    FILTER (
        ALL ('Data'),
        'Data'[Registration date] <= MAX('Data'[Registration date])
    )
)

Helpful resources

Announcements
Fabcon_Europe_Social_Bogo

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

Power BI Carousel June 2024

Power BI Monthly Update - June 2024

Check out the June 2024 Power BI update to learn about new features.

PBI_Carousel_NL_June

Fabric Community Update - June 2024

Get the latest Fabric updates from Build 2024, key Skills Challenge voucher deadlines, top blogs, forum posts, and product ideas.

RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.