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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
Anonymous
Not applicable

Need help with creating visual

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.

 

Dilpreeth_0-1638366504805.png

 

1 ACCEPTED 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.

vjaneygmsft_3-1638950368965.png

Integrate all measures into one measure.

vjaneygmsft_4-1638950585348.png

Measure1 =
VAR a =
    DISTINCTCOUNT ( Sheet1[order] )
VAR b =
    SUM ( Sheet1[wt] )
RETURN
    SWITCH (
        TRUE (),
        MAX ( 'Table'[Column1] ) = 1, a,
        MAX ( 'Table'[Column1] ) = 2, b
    )

 

vjaneygmsft_5-1638950646511.png

Modify the y axis setting, hide the y axis manually, and modify the interval.

vjaneygmsft_1-1638950169568.png

This will perfectly reproduce your needs.

vjaneygmsft_2-1638950179107.png

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

 

 

View solution in original post

11 REPLIES 11
amitchandak
Super User
Super User

@Anonymous , You can choose color for each measure or legend under data color

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

@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 

 

Dilpreeth_0-1638427585562.png

 

Hi, @Anonymous 

 

vjaneygmsft_3-1638870582569.pngvjaneygmsft_4-1638870594340.png

 

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?

vjaneygmsft_5-1638870689728.png

 

Best Regards,
Community Support Team _ Janey

 

 

Anonymous
Not applicable

Dilpreeth_1-1638871932283.png

 

Anonymous
Not applicable

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

 

Dilpreeth_0-1638871716914.png

 

@Anonymous 

 

Do you mean you want each measure have the same color but each name for different color?

Anonymous
Not applicable

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)?

 

 

Anonymous
Not applicable

Here's the sample file

https://drive.google.com/file/d/1Y9UZMEnprJxlXhrQ1GBR8W8565qIGW5H/view?usp=sharing

 

Dilpreeth_0-1638946842068.png

 

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.

vjaneygmsft_3-1638950368965.png

Integrate all measures into one measure.

vjaneygmsft_4-1638950585348.png

Measure1 =
VAR a =
    DISTINCTCOUNT ( Sheet1[order] )
VAR b =
    SUM ( Sheet1[wt] )
RETURN
    SWITCH (
        TRUE (),
        MAX ( 'Table'[Column1] ) = 1, a,
        MAX ( 'Table'[Column1] ) = 2, b
    )

 

vjaneygmsft_5-1638950646511.png

Modify the y axis setting, hide the y axis manually, and modify the interval.

vjaneygmsft_1-1638950169568.png

This will perfectly reproduce your needs.

vjaneygmsft_2-1638950179107.png

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

 

 

Anonymous
Not applicable

Thank You!!

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

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.

Top Solution Authors