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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
Anonymous
Not applicable

how to do to display the colored bars in alternately for the first 5 lines as TOP ?

Today, we see the  same or different colored bars for some bars .

see a snapchot below.

colored bars.PNG

I would like to appear the bars all different, automatically without naming the corresponding color name of the data. Is it possible ?

 

In Advance, thank you for your help.

 

sincerely

 

1 ACCEPTED SOLUTION

@Anonymous 

Sorry if I'm being obtuse..The filter you show is selecting the top 5 categories based on a measure, correct?

If so, create a measure using RANKX to rank the values according the measure you used in the filter.

Here is my example:

 

 

RANKX for Condit Format = RANKX(ALL('Fact Table'[Item]); [Sum Actuals];; DESC; Dense)

 

 

And now use this to establish different colours for each bar using conditional format on the "Data Colors" under the visual's formatting pane.

Click on the ellipsis under Data Colors to acess the conditional formattingClick on the ellipsis under Data Colors to acess the conditional formatting

Condit Format RANKX.JPG

Which gets you this (notice the TopN filter in the filter pane, similar to yours I think)Inkedpage_LI.jpg

 

Or am I misunderstadning what you are saying?

 





Did I answer your question? Mark my post as a solution!
In doing so, you are also helping me. Thank you!

Proud to be a Super User!
Paul on Linkedin.






View solution in original post

10 REPLIES 10
PaulDBrown
Community Champion
Community Champion

@Anonymous 

Check out his thread for some pointers:
Colouring bars with conditional format 

 

As an alternative, if the categories are stable in number, you can set a colour for each category in the format pane, under Data Colors:

data colours.JPG

 Switch on "Show all" and then set a colour for each category:

data colours 2.JPG

 

 





Did I answer your question? Mark my post as a solution!
In doing so, you are also helping me. Thank you!

Proud to be a Super User!
Paul on Linkedin.






Anonymous
Not applicable

thank you for your answer.

Please to see my answer where I tried to explain more cleanly, please.

 

I hope you understand this.

 

best regards

@Anonymous 

The second part of my answer (beginning with "As an alternative...") explains how you can select colours for whatever categories you choose.

doesn't this work for you?





Did I answer your question? Mark my post as a solution!
In doing so, you are also helping me. Thank you!

Proud to be a Super User!
Paul on Linkedin.






Anonymous
Not applicable

thank you for your answer.

 

For the categories, these are to display in the left column . I don't need that . 

But, I would just like to see the displayed different colors in the first 5 bars ( 5 is a chosen number , placed in a filter. See snapshot screen, below)

filter_n_premier.PNG

 

 

 

 

 

 

 

 

 

 

 

( ==> Order numbers should not be added based on decreasing or increasing number .)

That's all !. 

 

Thank you in advance for your answer

@Anonymous 

Sorry if I'm being obtuse..The filter you show is selecting the top 5 categories based on a measure, correct?

If so, create a measure using RANKX to rank the values according the measure you used in the filter.

Here is my example:

 

 

RANKX for Condit Format = RANKX(ALL('Fact Table'[Item]); [Sum Actuals];; DESC; Dense)

 

 

And now use this to establish different colours for each bar using conditional format on the "Data Colors" under the visual's formatting pane.

Click on the ellipsis under Data Colors to acess the conditional formattingClick on the ellipsis under Data Colors to acess the conditional formatting

Condit Format RANKX.JPG

Which gets you this (notice the TopN filter in the filter pane, similar to yours I think)Inkedpage_LI.jpg

 

Or am I misunderstadning what you are saying?

 





Did I answer your question? Mark my post as a solution!
In doing so, you are also helping me. Thank you!

Proud to be a Super User!
Paul on Linkedin.






Anonymous
Not applicable

hello,

 

Thank you for your answer.

I think that 's right.

First of all, i am not yet operational on the power bi !.

I wonder if we should create a measurement table ( because I saw "main measures" in your snapshot screen)? if yes, could the result of measurement change value depending on the selector as select value (parameter) ?  

@Anonymous 

 

No need to create a measure table.

You can create these kinds of tables ("measure tables") to keep things little more tidy, but having them, and the measures within, in no way affects the calculations. 

The measure will work irrespective of where they lie in the fields bucket (be it in a data/fact table, a dim or lookup table or a "measure table"). Measures always refer to the tables and fields (or other measures) which the calculations act upon: where they are kept is irrelevant.

 

Please remember to mark the post which solves your question as a solution, since this helps others looking to solve similar issues.





Did I answer your question? Mark my post as a solution!
In doing so, you are also helping me. Thank you!

Proud to be a Super User!
Paul on Linkedin.






Anonymous
Not applicable

Hello,

 

Knipsel3.PNG

 

Please check the screenshot to apply Conditional formatting

Anonymous
Not applicable

thank you for your quick answer.

but it's not quite it.

My goal is to display automatically several color, all different in bars without know the value as min and max, etc ... Nothing. 

In theoretically, just put 5 different colors on  the first bars as Top 5 numbers. 

This makes it to see easier all the different bars. 

Is it clear for you ?

 

I hope you understand what I mean this ?...

sincerely

Anonymous
Not applicable

could you not do a DAX that does the same query and applies a 1,2,3,4,5 in order to the top results?

 

that way, you can then use conditional formatting over those 5 numbers. 

 

This isnt my area of knowledge, but if i was trying to achieve this, that is how i would try and achieve it.

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!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

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