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

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.

Reply
vrajkumar1
Helper II
Helper II

Color saturation in clustered column chart

How can I get something like this below (different hues of one color) in a clustered column chart.

The month (x-axis) order would change every month.  Next month, 05 will be at the end and 06 in the front.

But the color hue order would not change.  

Regardless of the x-axis order, the graph will always look like this.

 

vrajkumar1_0-1659116443692.png

Here is the data:

AGE_GROUPMayJunJulAugSepOctNovDecJanFebMarApr
0-171.821.661.61.541.571.581.631.561.651.541.521.74
18-642.242.252.222.182.232.252.262.112.242.262.32.23
65 and Over2.32.312.282.262.32.322.32.32.352.352.362.33

 

Thank you for your help!

Vadivu

1 ACCEPTED SOLUTION

let
    Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("ZYw9DoMwDIWvgjxDVNvY+BY9QJQBqV0ZGHr+NnmpRMTiT8/vJ2d6LLzRTJxCGtyBdm0FkLCApVA9aEMSI9tKZc7EsXj9S5IOA6SBA0oHz+Hx0MNT//k67jbtx2t6ft7nxdTei3tP5SpwbUBP//bLFw==", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [AGE_GROUP = _t, #"5/1/2021" = _t, #"6/1/2021" = _t, #"7/1/2021" = _t, #"8/1/2021" = _t, #"9/1/2021" = _t, #"10/1/2021" = _t, #"11/1/2021" = _t, #"12/1/2021" = _t, #"1/1/2022" = _t, #"2/1/2022" = _t, #"3/1/2022" = _t, #"4/1/2022" = _t]),
    #"Unpivoted Other Columns" = Table.UnpivotOtherColumns(Source, {"AGE_GROUP"}, "Month", "Value"),
    #"Changed Type" = Table.TransformColumnTypes(#"Unpivoted Other Columns",{{"Month", type date}, {"Value", type number}})
in
    #"Changed Type"

 

Measure := DATEDIFF(TODAY(),max('Table'[Month]),MONTH)

 

lbendlin_0-1659281905071.png

 

View solution in original post

4 REPLIES 4
lbendlin
Super User
Super User

See attached.

 

Notes

- your source data is not suitable for Power BI. It needs to be unpivoted (and the year needs to be added).

- I added a measure to produce the gradient 

- there is a bug in the current Power BI Desktop that ignores the instruction not to concatenate X axis labels. It is caused by the new format pane. Hopefully they can fix that soon.

 

 

Thank you.  I am not able to open the attached file.  I have Jan 2021 Desktop Power BI version.

let
    Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("ZYw9DoMwDIWvgjxDVNvY+BY9QJQBqV0ZGHr+NnmpRMTiT8/vJ2d6LLzRTJxCGtyBdm0FkLCApVA9aEMSI9tKZc7EsXj9S5IOA6SBA0oHz+Hx0MNT//k67jbtx2t6ft7nxdTei3tP5SpwbUBP//bLFw==", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [AGE_GROUP = _t, #"5/1/2021" = _t, #"6/1/2021" = _t, #"7/1/2021" = _t, #"8/1/2021" = _t, #"9/1/2021" = _t, #"10/1/2021" = _t, #"11/1/2021" = _t, #"12/1/2021" = _t, #"1/1/2022" = _t, #"2/1/2022" = _t, #"3/1/2022" = _t, #"4/1/2022" = _t]),
    #"Unpivoted Other Columns" = Table.UnpivotOtherColumns(Source, {"AGE_GROUP"}, "Month", "Value"),
    #"Changed Type" = Table.TransformColumnTypes(#"Unpivoted Other Columns",{{"Month", type date}, {"Value", type number}})
in
    #"Changed Type"

 

Measure := DATEDIFF(TODAY(),max('Table'[Month]),MONTH)

 

lbendlin_0-1659281905071.png

 

Thank you very much for your assist

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.