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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Anonymous
Not applicable

Creating a stacked chart from two separate tables

Morning I am trying to create a stacked bar chart, using data from two different tables.  But I am having trouble getting it in the format that I need. I have attached some sample data and below is a copy of the graph I am after and the graph I am gettiing.  Any help would be great.  

I have gone down the approach of using seperate tables, so it allows me to use a slicer for each plan as I will have muliple plans to compare.  so when I import the data I use power query, to merge all the plans and then duplicate the table,   hope this all makes sense.  

 

wortandy_0-1650528932112.png

 

sorry cant work out how to attach something here, so have added the below.

 

MetricRegionDateValuePlan
DL Gross HoursNational04/04/2022134,939Plan 1
DL HolidayNational04/04/202219,547Plan 1
DL SicknessNational04/04/20228,117Plan 1
DL DowntimeNational04/04/202212,797Plan 1
     
MetricRegionDateValuePlan
DL Gross HoursNational04/04/2022133,204Plan 2
DL HolidayNational04/04/202221,156Plan 2
DL SicknessNational04/04/202211,523Plan 2
DL DowntimeNational04/04/202212,915Plan 2
1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@Anonymous , Create common dimensions Plan and metric and join them with your tables, and use in visual

 

Metric= distinct(union(distinct(Table1[Metric]),distinct(Table2[Metric])))

 

Plan= distinct(union(distinct(Table1[Plan]),distinct(Table2[Plan])))

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

View solution in original post

2 REPLIES 2
amitchandak
Super User
Super User

@Anonymous , Create common dimensions Plan and metric and join them with your tables, and use in visual

 

Metric= distinct(union(distinct(Table1[Metric]),distinct(Table2[Metric])))

 

Plan= distinct(union(distinct(Table1[Plan]),distinct(Table2[Plan])))

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
Anonymous
Not applicable

Thanks for this, I should have said I am new to PBI so not really sure what I do with the above.  I assume they are measures??

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.