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
jkay27
Helper I
Helper I

Stacked bar chart - order by type then date, not just by date

Hi,

 

In the attached file, can anyone tell me if there is a way to make the stacked column chart order by type then date, rather than just date? The graph needs to show a set of "full year" values first - in date order - then show the "Rolling" columns next - in date order. This needs to be in a single graph.

 

Graph ordering issue

 

Many thanks for any suggestions.

 

 

1 ACCEPTED SOLUTION
TeigeGao
Solution Sage
Solution Sage

Hi @jkay27 ,

According to your description, my understanding is that you want to sort Stacked bar chart by type then date. Based on my test, we can't so it directly in Legend.

As a workaround, we can use the following methods:

First One: Using different measures for each Type, then drag all measures to the value.

Second one: Create a hierarchy for Type and Reference Date, then drag this hierarchy to Axis, after that we can Expand down all one level in hierarchy.

The result will like below:

Snipaste_2019-04-16_10-22-26.png

Best Regards,

Teige

View solution in original post

3 REPLIES 3
TeigeGao
Solution Sage
Solution Sage

Hi @jkay27 ,

According to your description, my understanding is that you want to sort Stacked bar chart by type then date. Based on my test, we can't so it directly in Legend.

As a workaround, we can use the following methods:

First One: Using different measures for each Type, then drag all measures to the value.

Second one: Create a hierarchy for Type and Reference Date, then drag this hierarchy to Axis, after that we can Expand down all one level in hierarchy.

The result will like below:

Snipaste_2019-04-16_10-22-26.png

Best Regards,

Teige

@TeigeGao thanks for this, but in your example how have you assigned the colours to each column (for the second workaround)? Also, doesn't seem to be a way of ordering these columns except asc/desc.

 

If you use your second method, there also doesn't seem to be a way to order except for A-Z or Z-A, so "Rolling" is always coming first or last, when in fact it should be in the middle. Do you have any suggestions?

 

Thanks again

 

 

Hi @jkay27 ,


If you use your second method, there also doesn't seem to be a way to order except for A-Z or Z-A, so "Rolling" is always coming first or last, when in fact it should be in the middle. Do you have any suggestions?


In this scenario, we can create a column with the order you want, then sort the column with the order column.

Best Regards,

Teige

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.