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.
Hey everyone, short question.
I have a bar chart that looks like the following (see image below):
The grey bar is a measure.
The green bar is sum(table1[column 1])
What I would like to achieve, is to add sum(table 2[column 1]) to the other bar from table 1 (as illustrated), and have both in different colour.
I know there is a visual for a stacked bar chart, but that one stacks both the grey and green line. I think I have to use the legend to differenciate which bars belong together, but since the data is from different tables im not sure how I can achieve this.
thanks!
Solved! Go to Solution.
Hi @ErikBI ,
You need to create a workaround to have this made:
Table1_Value = SUM(Table1[Value])
Table2_Value = SUM('Table 2'[Value])
Measure |
A |
B |
SelectionTable1_Values = SWITCH(SELECTEDVALUE('Table'[Measure]);"a";[Measure];"b";Table1[Table1_Value])
SelectionTable2_values = SWITCH(SELECTEDVALUE('Table'[Measure]);"b";'Table 2'[Table2_Value])
Check result below and in attach PBIX file.
Measure is just a simple one that I calculated to sum all values on table 1 below 40.000 (you can use your own).
Regards
Miguel Félix
Proud to be a Super User!
Check out my blog: Power BI em PortuguêsHi @ErikBI ,
To achieve this you need to have some relationship between the two tables, how is the values from table 1 and table 2 related?
Is the Axis values in common between both tables?
Do you want to have a 2 bar with 2 colour (measure one colour Table1+Table2 another colour) or 2 bars 3 colours (measure one colour Table1 one colour Table2 one colour)
Can you share some sample data for the measure and both tables?
Regards
Miguel Félix
Proud to be a Super User!
Check out my blog: Power BI em PortuguêsHey Felix,
Sorry for the late reply. Been on and off for a while.
The x values are all the same (euros).
In my previous example. Table 1 is the green bar. Measurue 1 is the grey bar.
I would like to add table 2 to the green bar of table 1, but with a different color.
Hope it makes sense now! 🙂
Hi @ErikBI ,
You need to create a workaround to have this made:
Table1_Value = SUM(Table1[Value])
Table2_Value = SUM('Table 2'[Value])
Measure |
A |
B |
SelectionTable1_Values = SWITCH(SELECTEDVALUE('Table'[Measure]);"a";[Measure];"b";Table1[Table1_Value])
SelectionTable2_values = SWITCH(SELECTEDVALUE('Table'[Measure]);"b";'Table 2'[Table2_Value])
Check result below and in attach PBIX file.
Measure is just a simple one that I calculated to sum all values on table 1 below 40.000 (you can use your own).
Regards
Miguel Félix
Proud to be a Super User!
Check out my blog: Power BI em PortuguêsHey Felix,
First of all, my apologies for replying to you so late. I've been working on and off this project and it got put aside for a bit.
At first I was a bit confused by how you calculated the "a' bar by exlcuding the 44k. But after digging through your example file I managed to understand the method that you used to create the graph and I managed to get it working!
Thanks so much for your help!
Here is what my end result looks like now:
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 |
---|---|
109 | |
98 | |
77 | |
66 | |
54 |
User | Count |
---|---|
144 | |
104 | |
100 | |
86 | |
64 |