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

Score big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount

Reply
Anonymous
Not applicable

How to calculate the number of rows that fall within 2 dates, dynamically on a graph

Hello, I am, struggling to figure out the best (or any!) way to do the following..

 

I need to plot numbers in treatment. I have a dataset with client details per line, and for each I have a treatment start date and a treatment end date. I need to show per month, how many of these rows were in active treatment at any part of that month. For example, if the start date is lower than the end of that month (started either before or during that month), and the end date is either blank (still active) or higher than the start of that month (closed within the month), then how many fall into this category. 

 

I think I can figure out how to do this for a specific month, however I need this to be dynamic, so I can plot on a graph the numbers in treatment on a monthly basis and see how much this changes month on month. 

 

Does anyone have any idea how I could do this please? Tearing my hair out a little over this! TIA  

1 REPLY 1
v-zhangti
Community Support
Community Support

Hi, @Anonymous 

 

Can you provide sample data for testing? Sensitive information can be removed in advance. What kind of expected results do you expect? You can also show it with pictures or Excel. I look forward to your response.

 

Best Regards,

Community Support Team _Charlotte

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

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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