Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
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:-
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. 🙂
Hi @Power_It_Up
You can write a dax formula like below to get the output you require.
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:
2) Case #10 was opened in March and is still open, so the below is spot-on:-
So it seems that with closed cases, it only plots for the month the case was open.
Many thanks again! 🙂
@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. 🙂
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
| User | Count |
|---|---|
| 20 | |
| 11 | |
| 9 | |
| 4 | |
| 4 |
| User | Count |
|---|---|
| 31 | |
| 29 | |
| 21 | |
| 12 | |
| 12 |