Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
Hi,
I have a chart as shown below. Currently there are 4 measures used to show the numbers against a common axis. I am trying to use a field as legend which will segment each bar using that same field. Is that possible. Currently each bar is auomatically assigned a color based on the measure.
Solved! Go to Solution.
Hi, @Anonymous
I understand your needs, but Powerbi doesn't have such a visual. If you place multiple measures on the values, you can't put legend.
But I have a workaround.
You need to create a single table using 'enter data' as axis, The number of rows matches the number of your measure.
Integrate all measures into one measure.
Measure1 =
VAR a =
DISTINCTCOUNT ( Sheet1[order] )
VAR b =
SUM ( Sheet1[wt] )
RETURN
SWITCH (
TRUE (),
MAX ( 'Table'[Column1] ) = 1, a,
MAX ( 'Table'[Column1] ) = 2, b
)
Modify the y axis setting, hide the y axis manually, and modify the interval.
This will perfectly reproduce your needs.
Did I answer your question ? Please mark my reply as solution. Thank you very much.
If not, please feel free to ask me.
Best Regards,
Community Support Team _ Janey
@amitchandak : I am looking at segmenting each bar using the same field....something like below
Example: Product group field used to segment each bar into diff colours
Hi, @Anonymous
The settings of these two pictures are different, So what you want to get? I don't quite understand what you mean.
Can you show a screenshot of visual settings like below? Do you want the same color or a different color?
Best Regards,
Community Support Team _ Janey
This is something easily doable in Tableau. There should be 4 bars based on 4 different measures and each of them have to be color coded using the same dimension
For example: Facility name shows split of each facility across 4 measures
@Anonymous
Do you mean you want each measure have the same color but each name for different color?
The scenario is somewhat like this
1. Lets say there are 4 measures
2. There is one dimension field - Facility name
3. I am trying to segment each measure using this same facility name field to undertand how much each facility contributes to the total value of that measure
4. For example measure 1 has value of 50...I need a breakdown of that 50 by each facility
5. Same way for other measures using this same facility field
Hi, @Anonymous
Which visual are you currently using?
What is the difference between the currently used visual and the result you want?
Tableau and powerbi are different, I need to analyze the specific data and situation in your powerbi report. Can you share some sample data and your desired result like(in powerbi)?
Here's the sample file
https://drive.google.com/file/d/1Y9UZMEnprJxlXhrQ1GBR8W8565qIGW5H/view?usp=sharing
I am trying to drag facility to legend so that each bar will have a multiple colors correspoding to each facility
Hi, @Anonymous
I understand your needs, but Powerbi doesn't have such a visual. If you place multiple measures on the values, you can't put legend.
But I have a workaround.
You need to create a single table using 'enter data' as axis, The number of rows matches the number of your measure.
Integrate all measures into one measure.
Measure1 =
VAR a =
DISTINCTCOUNT ( Sheet1[order] )
VAR b =
SUM ( Sheet1[wt] )
RETURN
SWITCH (
TRUE (),
MAX ( 'Table'[Column1] ) = 1, a,
MAX ( 'Table'[Column1] ) = 2, b
)
Modify the y axis setting, hide the y axis manually, and modify the interval.
This will perfectly reproduce your needs.
Did I answer your question ? Please mark my reply as solution. Thank you very much.
If not, please feel free to ask me.
Best Regards,
Community Support Team _ Janey
Thank You!!
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.