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.
Hi, I have a chart with two measures, one with positive and other with negative values, like this
And the problem is that I can't put the legends of the different items so that each bar is split in differents colors, something like this (I had to put two different charts to do that)
When I have only one measure in the chart i can put legends, but not when I have two measures.
Thanks a lot
Solved! Go to Solution.
Hi @Carlos_Ponce ,
You cannnot have legends and more than one measure on the visualizations is one of the limitations, for this to work you would need to have a table with a MGI or using calculation groups so you would have the measures on the calculation and the values on the legends.
Regards
Miguel Félix
Proud to be a Super User!
Check out my blog: Power BI em PortuguêsHi @Carlos_Ponce ,
MGI is Mother-Generated Index calculation meaning that you would have a table similar to this:
Index | Measure |
1 | Measure 1 |
2 | Measure 2 |
3 | Measure 3 |
4 | Measure 4 |
Then using a Switch metric you would pull each metric for the visualization.
Similar to:
Metric Value =
SWITCH (
SELECTEDVALUE ( Table[Index] ),
1, [Measure 1],
2, [Measure 2],
3, [Measure 3],
4, [Measure 4]
)
Now if you use the Column on the table on top for the Legend and the Measure to the values you get multiple measures with legend.
It seems to me that you have a variable number of values that will be picked up base on a categorization or something similar, that will be a lot of values and not a small number so would be doable but maybe hard coding a little.
Regards
Miguel Félix
Proud to be a Super User!
Check out my blog: Power BI em PortuguêsHi @Carlos_Ponce ,
You cannnot have legends and more than one measure on the visualizations is one of the limitations, for this to work you would need to have a table with a MGI or using calculation groups so you would have the measures on the calculation and the values on the legends.
Regards
Miguel Félix
Proud to be a Super User!
Check out my blog: Power BI em PortuguêsHi @MFelix thanks a lot for the answer.
Im a little new in this, what dos it mean table whith MGI? I searched in internet but didnt find it.
Hi @Carlos_Ponce ,
MGI is Mother-Generated Index calculation meaning that you would have a table similar to this:
Index | Measure |
1 | Measure 1 |
2 | Measure 2 |
3 | Measure 3 |
4 | Measure 4 |
Then using a Switch metric you would pull each metric for the visualization.
Similar to:
Metric Value =
SWITCH (
SELECTEDVALUE ( Table[Index] ),
1, [Measure 1],
2, [Measure 2],
3, [Measure 3],
4, [Measure 4]
)
Now if you use the Column on the table on top for the Legend and the Measure to the values you get multiple measures with legend.
It seems to me that you have a variable number of values that will be picked up base on a categorization or something similar, that will be a lot of values and not a small number so would be doable but maybe hard coding a little.
Regards
Miguel Félix
Proud to be a Super User!
Check out my blog: Power BI em PortuguêsCovering 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 |
---|---|
102 | |
101 | |
78 | |
69 | |
63 |
User | Count |
---|---|
141 | |
106 | |
101 | |
85 | |
72 |