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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
Power_It_Up
Helper II
Helper II

Repeat case totals for each month from Open Date to End Date

Hi.

 

The task here is to create a graph which shows the period of time a case was opened until closure (if not Closed, then default current date).

 

For example, Case # 10 was opened in February and is still open, so I have made an End Date calculation to show that if there is no Closed Date, then to default to current date.  

 

The graph needs to represent this data as follows:-

 

 

Power_It_Up_0-1712930992957.png

 

So a value of 1 for each month the case has been opened until closure (End Date).

 

Have attached a test workbook.

Edit: Actually, not sure how to attach workbook.

 

Many thanks in advance for any pointers and advice. 🙂

4 REPLIES 4
DataNinja777
Super User
Super User

Hi @Power_It_Up 

You can write a dax formula like below to get the output you require.

DataNinja777_0-1713005324770.png

DataNinja777_1-1713005352251.png

I attach a pbix file as an example.  

Hi @DataNinja777 and many thanks for your reply and test sample.

 

Nearly there.  Two examples....

 

1) Case #7 was opened in March and closed in April.  I would expect to see a bar for both March AND April with a count of 1 in each:

Power_It_Up_0-1713188065879.png

 

2) Case #10 was opened in March and is still open, so the below is spot-on:-

Power_It_Up_1-1713188208671.png

 

 

So it seems that with closed cases, it only plots for the month the case was open.

 

Many thanks again! 🙂

 

 

 

quantumudit
Super User
Super User

Hello @Power_It_Up 

Please provide a sample anonymized dataset. Need to understand the data model to form an appropriate solution

 

Best Regards,
Udit

🚀 Let's Connect: LinkedIn || YouTube || Medium || GitHub
Visit My Linktree: LinkTree

@quantumudit Many thanks for your reply.  I can't seem to attach a workbook, so couldn't provide any sample data and only by screenshot. 🙂

Helpful resources

Announcements
July PBI25 Carousel

Power BI Monthly Update - July 2025

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

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 community update carousel

Fabric Community Update - June 2025

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