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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
Namoh
Post Partisan
Post Partisan

Sort clustered bar chart by all values not available?

Hi experts of Power BI!!

 

I have a very easy request but somehow I can't get it to work.

 

I have a clustered bar chart, with on the y-axis a number of facilities.

On the x-axis I've got 4 measures.

 

By default the graph sorts on Facility, and when I click the 3 dots (More options) in the top-right corner, I can select Sort By and I have the choice between my 4 measures.

What I also would like be able to do, is to sort by All Values.

 

But I can't find this option.

 

How to fix this?

 

So in below screenshots, I would like to sort the bars sothat the sequence would be:

- blue bar, facility X, value 159

- orange bar, facility Y, value 152

- orange bar, facilty Z, value 143

- orange bar, facility X, value 109

- green bar, facilty A, value 100

- green bar, facility X, value 98

- purple bar, facility B, value 88

- purple bar, facility Y, value 86

- etc

 

Btw, I removed the facility names because of confidentiality.

 

Sort_issue_001_standaard.pngSort_issue_002_no_by_value_overall.png

8 REPLIES 8
amitchandak
Super User
Super User

@Namoh , Doubt there an option for that, but you can do, add a measure on the tooltip, which is the sum of all 4 measures.

And then you should have an option to sort on the tooltip measure. 

@amitchandak, I'm not quite sure what you're suggesting. I would like to keep all the bars as shown, just sort them from high to low. Could you give me an example of how the measure should look like with the use of dummy names for the current measures?

@Namoh , Based on what I got from the problem.

If I have measures M1, M2, M3, M4 and I want to sort the visual on M1+M2+M3+M4

 

Then create a measure 

M5 = M1+M2+M3+M4

 

Use this measure as a tooltip in stacked visual and then in three dots you will see M5, you can sort on that

Hi amitchandak, thanks for the reply but this new measure is adding the different measure into one. But this is not what I want.

 

I'll try to explain it otherwise.

 

I have multiple facilities, and I have 5 measures.

I have facilities on y-axis and measures as values (x-axis).

Automatically it sorts by facility, and via the three dots (...) I can also choose Sort by: Measure 1, Measure 2, Measure 3, Measure 4 or Measure 5.

 

I would like to sort it as follows:

- any combination of facility with a measure from high to low.

 

I've made a table from the graph to show which values I would like to see 1ste, 2nd, 3rd, etc.

Sort_issue_003_explanation_wanted_result.png

Hope this helps.

 

Note: facility = werkeenheid, in the graph and table

 

I'm thinking I need to create a new Measure which add all 5 measures together in 1 column/row, so I can sort on that via Tooltip....................but can't figure out, how this new measure would look like.

 

Anyone who can give me starting point?

Hi @Namoh ,

 

v-lionel-msft_2-1617093409826.png

If you can construct the data model like this, then you can sort the entire measure. Also, please pay attention to the Y-axis. The Y-axis can not group measure.'

 

Best regards,
Lionel Chen

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

 

@v-lionel-msft , thanks for the reply.

 

The sorting within the visualisation is what I would like to see, but I'm not quite sure if the visualisation is what I need.

 

Your y-axes now shows a (random?) Index number, and none of them are the same. I would like to show the facilities (multiple times) on the y-axis.
Bars coloured by type of measure.

How do I create the Measure Name, that you use in field Legend?

What you have, is what I need, but instead of random Index numbers, it should show the facilities.

 

See below for an example made in excel. 

 

Sort_issue_004_this_is_what_it_should_be_sort_by_all_values.png

If this is not possible (yet) (it's basically nothing more than a "Sort by All Values"), how can I add this as a request for an upcoming update?

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

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.