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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

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
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.