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
erica_cara
Frequent Visitor

Counting the number of occurrences on a date and cumulative totals

Good morning,

 

I have searched the threads and am struggling to find a solution to my problem. I have a data table of student withdrawals that contains the following columns:

 

Term                 Withdrawal Date       Start Date          Days from Start withdrawal occured

2021sp             01/26/21                   01/06/21            20

2021sp             02/03/21                   01/06/21            28

2021sp             01/26/21                   01/06/21            20

2021sp             02/02/21                   01/06/21            27

2021sp             02/03/21                   01/06/21             28

 

Within this table, each term will have multiple withdrawals on the different withdrawal dates. I would like be able to count the number of withdrawals occuring on each date per term AND create a running total of withdrawals per term. For example, on 1/26 there were 2 withdrawals, on 2/2 there was one, and on 2/3 there were 2;  at the end of 2/3 the cumulative withdrawals for 2021sp would be 5.

 

How would I do both of these calculations?

 

Thank you!

 

 

1 ACCEPTED SOLUTION
ryan_mayu
Super User
Super User

@erica_cara 

you can try

Measure = calculate(COUNTROWS('Table (2)'),FILTER(all('Table (2)'),'Table (2)'[Withdrawal Date]<=max('Table (2)'[Withdrawal Date])))

1.PNG





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

Proud to be a Super User!




View solution in original post

3 REPLIES 3
v-kkf-msft
Community Support
Community Support

Hi @erica_cara ,

 

Please create the following measure:

 

number of withdrawals = COUNT('Table'[Withdrawal Date])

image.png

 

If the problem is still not resolved, please provide detailed error information or the expected result you expect. Let me know immediately, looking forward to your reply.

Best Regards,
Winniz

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

Thank you for your reply. Rather than having a total number of withdrawals tallied in a table, I need the data to show like this:

 

1/26/21 = 2

2/2/21 = 3

2/3/21 = 5

 

I need this in a way I could show it on a line graph.

ryan_mayu
Super User
Super User

@erica_cara 

you can try

Measure = calculate(COUNTROWS('Table (2)'),FILTER(all('Table (2)'),'Table (2)'[Withdrawal Date]<=max('Table (2)'[Withdrawal Date])))

1.PNG





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

Proud to be a Super User!




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.