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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
MattJacob
Frequent Visitor

Create a Daily Status Stacked Chart with Start- and Enddate

Hello,

 

I have a question. I would like to build a daily stacked chart with the amount of open cases divided by status. The problem is that I only have a start- and enddate for the status. 

 

My dataset looks as follows:

Case

Status

Startdate Status

Enddate Status

X

C

4-1-2022

5-1-2022

X

B

2-1-2022

4-1-2022

X

A

1-1-2022

2-1-2022

Y

B

2-1-2022

3-1-2022

Y

A

1-1-2022

2-1-2022

Z

A

4-1-2022

5-1-2022

 

And my output should look something like this:

Capture6.JPG

Is this possible?

 

Thanks!

 

 

1 ACCEPTED SOLUTION
v-yueyunzh-msft
Community Support
Community Support

Hi , @MattJacob 

According to your description, you want to "Create a Daily Status Stacked Chart with Start- and Enddate".

Here are the steps you can refer to :
(1)This is my test data:

vyueyunzhmsft_0-1675909765134.png

(2)We need to create a date dimension date table as the X-axis:

Date = CALENDAR(FIRSTDATE('Table'[Startdate Status]),LASTDATE('Table'[Enddate Status]))

We do not need to create any relationship between two tables.

 

(3)Then we can create a measure:

Measure = var _cur_date= MAX('Date'[Date])
var _t =FILTER('Table' , 'Table'[Startdate Status]<= _cur_date  && 'Table'[Enddate Status]> _cur_date)
return
COUNTROWS(_t)

 

(4)We can put the fields on the visual and we can meet your need:

vyueyunzhmsft_1-1675909839561.png

 

Thank you for your time and sharing, and thank you for your support and understanding of PowerBI! 

 

Best Regards,

Aniya Zhang

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

View solution in original post

4 REPLIES 4
v-yueyunzh-msft
Community Support
Community Support

Hi , @MattJacob 

According to your description, you want to "Create a Daily Status Stacked Chart with Start- and Enddate".

Here are the steps you can refer to :
(1)This is my test data:

vyueyunzhmsft_0-1675909765134.png

(2)We need to create a date dimension date table as the X-axis:

Date = CALENDAR(FIRSTDATE('Table'[Startdate Status]),LASTDATE('Table'[Enddate Status]))

We do not need to create any relationship between two tables.

 

(3)Then we can create a measure:

Measure = var _cur_date= MAX('Date'[Date])
var _t =FILTER('Table' , 'Table'[Startdate Status]<= _cur_date  && 'Table'[Enddate Status]> _cur_date)
return
COUNTROWS(_t)

 

(4)We can put the fields on the visual and we can meet your need:

vyueyunzhmsft_1-1675909839561.png

 

Thank you for your time and sharing, and thank you for your support and understanding of PowerBI! 

 

Best Regards,

Aniya Zhang

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

Thank you! This worked!

amitchandak
Super User
Super User

@MattJacob , check if this can help

 

Power BI Dax Measure- Allocate data between Range: https://youtu.be/O653vwLTUzM

 

or

 

Power BI: HR Analytics - Employees as on Date : https://youtu.be/e6Y-l_JtCq4
https://community.powerbi.com/t5/Community-Blog/HR-Analytics-Active-Employee-Hire-and-Termination-tr...

 

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Thank you! I learned a lot from the videos, but the other reply was a bit more helpful for my case.

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors