Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
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.
sorry cant work out how to attach something here, so have added the below.
Metric | Region | Date | Value | Plan |
DL Gross Hours | National | 04/04/2022 | 134,939 | Plan 1 |
DL Holiday | National | 04/04/2022 | 19,547 | Plan 1 |
DL Sickness | National | 04/04/2022 | 8,117 | Plan 1 |
DL Downtime | National | 04/04/2022 | 12,797 | Plan 1 |
Metric | Region | Date | Value | Plan |
DL Gross Hours | National | 04/04/2022 | 133,204 | Plan 2 |
DL Holiday | National | 04/04/2022 | 21,156 | Plan 2 |
DL Sickness | National | 04/04/2022 | 11,523 | Plan 2 |
DL Downtime | National | 04/04/2022 | 12,915 | Plan 2 |
Solved! Go to Solution.
@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])))
@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])))
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??
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
97 | |
96 | |
82 | |
74 | |
66 |
User | Count |
---|---|
126 | |
105 | |
103 | |
81 | |
72 |