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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
AAOLIVARESR
Frequent Visitor

Create a stacked bar chart showing 2 categories

Hello cummunity,

 

I'm making a dashboard for my consumption and I need that in a stacked bar chart shows me the open and closed tickets for the same month, in the example (below) I could do separately because the values of creation date and solution date of each ticket is not always the same day or the same month, when trying to occupy both categories in a single graph I have problems with the X axis because when adding the creation date as X axis brings me correctly the open but the closed ones it filters them and if I put the solution date it shows me correctly the amount closed but not the open tickets.

AAOLIVARESR_0-1716915522053.png

I tried to make a table of dates but when using it as X axis it brings me the total amount of tickets and not the detail by day.

AAOLIVARESR_1-1716915546241.png

I will leave the file available in this link if you can help me PLEASE.

1 ACCEPTED SOLUTION
TomMartens
Super User
Super User

Hey @AAOLIVARESR ,

 

due to the business subject "ticket tracking" there are two dates that will be associated with one ticket (at least two dates): opening and closing date.

 

To tackle this challenge you have to be aware that you are facing the "role-playing" dimension table, one calendar table is related to two date columns. One relationship is active and one is inactive, the inactive one will be actived inside a measure by using the DAX function USERELATIONSHIP.

 

I consider this article a good start into the realm of role-playing dimensions: Welcome to Power BI theatre: Role-Playing Dimensions! - Data Mozart (data-mozart.com)

 

Hopefully, this helps to tackle your challenge.

 

Regards,

Tom



Did I answer your question? Mark my post as a solution, this will help others!

Proud to be a Super User!
I accept Kudos 😉
Hamburg, Germany

View solution in original post

1 REPLY 1
TomMartens
Super User
Super User

Hey @AAOLIVARESR ,

 

due to the business subject "ticket tracking" there are two dates that will be associated with one ticket (at least two dates): opening and closing date.

 

To tackle this challenge you have to be aware that you are facing the "role-playing" dimension table, one calendar table is related to two date columns. One relationship is active and one is inactive, the inactive one will be actived inside a measure by using the DAX function USERELATIONSHIP.

 

I consider this article a good start into the realm of role-playing dimensions: Welcome to Power BI theatre: Role-Playing Dimensions! - Data Mozart (data-mozart.com)

 

Hopefully, this helps to tackle your challenge.

 

Regards,

Tom



Did I answer your question? Mark my post as a solution, this will help others!

Proud to be a Super User!
I accept Kudos 😉
Hamburg, Germany

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.

Top Solution Authors