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

The ultimate Microsoft Fabric, Power BI, Azure AI & SQL learning event! Join us in Las Vegas from March 26-28, 2024. Use code MSCUST for a $100 discount. Register Now

Reply
GrimReaperX
Helper II
Helper II

Making shadowed stacked column chart with slicers

Hello guys, 

I am trying to figure out how to create a stacked column chart reflecting a shadow connected dynamically with slicers ? I've seen it in the Gartner Life Expectancy dashboard which is as below. Any idea how to create this kind of dynamic column chart without using selection pane ? 

GrimReaperX_0-1654093943757.png

Link as follows (Gartner Analytics and BI Virtual Bake-Off 2020: world population health analysis with Power BI - You...)

Thank you.

 

1 ACCEPTED SOLUTION

Hi @GrimReaperX ,

You can apply different colors on the chart based on your condition, for example in my sample, I modify the color formula like this:

Measure =
IF (
    MAX ( 'Table'[Column1] ) >= MAX ( 'Table 2'[Column1] ),
    "Grey",
    IF (
        MAX ( 'Table'[Column1] )
            >= MAX ( 'Table 2'[Column1] ) - 5,
        "Orange",
        "Blue"
    )
)

Get the result. But in the slicer, the text can't be hided, it's by design.

vkalyjmsft_0-1654566950506.png

I attach my sample below for reference.

 

Best Regards,
Community Support Team _ kalyj

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

3 REPLIES 3
v-yanjiang-msft
Community Support
Community Support

Hi @GrimReaperX ,

According to your description, I create a sample.

vkalyjmsft_0-1654499628418.png

In the column chart, Column1 is in the Axis. Here's my solution.

1.Create a new table, don't make relationship between the two tables.

 

Table 2 = VALUES('Table'[Column1])

 

2.Create a measure.

 

Measure = IF(MAX('Table'[Column1])>= MAX('Table 2'[Column1]),"Grey","Blue")

 

3.In the column chart formatting pane>Columns>Colors, click the fx button.

vkalyjmsft_1-1654500083258.png

Select the new measure in the color formatting based on field.

vkalyjmsft_3-1654500380115.png

4.Put the column from the new table in a slicer, get the result.

vkalyjmsft_4-1654500572214.png

I attach my sample below for reference.

 

Best Regards,
Community Support Team _ kalyj

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

Hi @v-yanjiang-msft ,

 

Thanks for your answer, i greatly appreciate that. Is it also possible to apply different colors on the chart based on different buckets? As you can see from the picture that i shared in first post, there is different colors for specific range.

 

Moreover, is it possible to hide section below in the slicer? I just want to have slicer itself without any text. 

GrimReaperX_0-1654514544381.png

 

Thank you very much.

Hi @GrimReaperX ,

You can apply different colors on the chart based on your condition, for example in my sample, I modify the color formula like this:

Measure =
IF (
    MAX ( 'Table'[Column1] ) >= MAX ( 'Table 2'[Column1] ),
    "Grey",
    IF (
        MAX ( 'Table'[Column1] )
            >= MAX ( 'Table 2'[Column1] ) - 5,
        "Orange",
        "Blue"
    )
)

Get the result. But in the slicer, the text can't be hided, it's by design.

vkalyjmsft_0-1654566950506.png

I attach my sample below for reference.

 

Best Regards,
Community Support Team _ kalyj

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

Helpful resources

Announcements
Fabric Community Conference

Microsoft Fabric Community Conference

Join us at our first-ever Microsoft Fabric Community Conference, March 26-28, 2024 in Las Vegas with 100+ sessions by community experts and Microsoft engineering.

February 2024 Update Carousel

Power BI Monthly Update - February 2024

Check out the February 2024 Power BI update to learn about new features.

Fabric Career Hub

Microsoft Fabric Career Hub

Explore career paths and learn resources in Fabric.

Fabric Partner Community

Microsoft Fabric Partner Community

Engage with the Fabric engineering team, hear of product updates, business opportunities, and resources in the Fabric Partner Community.