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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
KateDANI
Frequent Visitor

Help please

Hello

 

After help please, I have created the below graph, but now I want each bar to show the breakdown in colours (red, amber, green) of what amount in £ is made up by margin below 8%, what amount in £ is made up from margin between 9-15% an what amount in £ is above 15%. In my data I have the margin percentages, please see below. 

 

Can anyone help please

 

KateDANI_0-1704968153749.png

 

KateDANI_1-1704968544318.png

 

thanks

1 ACCEPTED SOLUTION
v-xinruzhu-msft
Community Support
Community Support

Hi @KateDANI 

You can consider the following solution.

1.Create  a type columnin the table.

Type =
SWITCH (
    TRUE (),
    [Margin%] < 0.08, "0-8%",
    [Margin%] >= 0.08
        && [Margin%] < 0.15, "8%-15%",
    [Margin%] >= 0.15, ">=15%"
)

2.Then put the type column to the legend in the visual

vxinruzhumsft_0-1705024376926.png

 

Then you can set the color to the column in Columns.

vxinruzhumsft_1-1705024417535.png

Set the red color to the "0-8" and set the related color in other type.

Output

vxinruzhumsft_2-1705024599173.png

Best Regards!

Yolo Zhu

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

 

View solution in original post

1 REPLY 1
v-xinruzhu-msft
Community Support
Community Support

Hi @KateDANI 

You can consider the following solution.

1.Create  a type columnin the table.

Type =
SWITCH (
    TRUE (),
    [Margin%] < 0.08, "0-8%",
    [Margin%] >= 0.08
        && [Margin%] < 0.15, "8%-15%",
    [Margin%] >= 0.15, ">=15%"
)

2.Then put the type column to the legend in the visual

vxinruzhumsft_0-1705024376926.png

 

Then you can set the color to the column in Columns.

vxinruzhumsft_1-1705024417535.png

Set the red color to the "0-8" and set the related color in other type.

Output

vxinruzhumsft_2-1705024599173.png

Best Regards!

Yolo Zhu

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

 

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.

Top Kudoed Authors