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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
ThomasWeppler
Super User
Super User

Color scale for a specific visual

Hi Power Bi community

Is it possible to make a colorscale that always pick a specific color for the top customer?
I want to make a color scale so my visuals looks good.
I can chance the colors of the induvidual customers, like this.

ThomasWeppler_0-1732871725668.png

 

My problem is that when new customers become the top customer, Power BI might pick a random color that doesn't look good with the rest of my colors.
What should I do to make power BI automatically pick from the colors I have pre defined in a specific visual?

1 ACCEPTED SOLUTION
KriZo
Resolver II
Resolver II

@ThomasWeppler 

Could what i've done here solve it for you? Color kunde rank 

 

I've created the following table to hold the colors

KriZo_0-1732873002335.png

 

Used Rank on my X-axis here

KriZo_1-1732873031763.png

 

Created the following measure:

 

Kunde Rank sales = 
VAR _SelectedRank = SELECTEDVALUE(RankedCustomers[Rank])
VAR _Table = ADDCOLUMNS(
    SUMMARIZE(
        FactSales,
        FactSales[Kunde]
    ),
    "Total Sales", CALCULATE(SUM(FactSales[Revenue])),
    "Rank", RANKX(
        ALL(FactSales[Kunde]), -- Ensure ranking is global across all customers
        CALCULATE(SUM(FactSales[Revenue])), -- Value to rank by
        ,
        DESC,
        DENSE
    )
)

VAR _Revenue = SUMX(FILTER(_Table, [Rank] = _SelectedRank),[Total Sales])
RETURN 
_Revenue

 

 

And the I've setup conditional formatting like this: 

KriZo_2-1732873125398.png

 

 

Did I solve your question? Mark my post as a solution! Kudos are appreciated as well as LinkedIn endorsements.

 

174857.png

View solution in original post

2 REPLIES 2
KriZo
Resolver II
Resolver II

@ThomasWeppler 

Could what i've done here solve it for you? Color kunde rank 

 

I've created the following table to hold the colors

KriZo_0-1732873002335.png

 

Used Rank on my X-axis here

KriZo_1-1732873031763.png

 

Created the following measure:

 

Kunde Rank sales = 
VAR _SelectedRank = SELECTEDVALUE(RankedCustomers[Rank])
VAR _Table = ADDCOLUMNS(
    SUMMARIZE(
        FactSales,
        FactSales[Kunde]
    ),
    "Total Sales", CALCULATE(SUM(FactSales[Revenue])),
    "Rank", RANKX(
        ALL(FactSales[Kunde]), -- Ensure ranking is global across all customers
        CALCULATE(SUM(FactSales[Revenue])), -- Value to rank by
        ,
        DESC,
        DENSE
    )
)

VAR _Revenue = SUMX(FILTER(_Table, [Rank] = _SelectedRank),[Total Sales])
RETURN 
_Revenue

 

 

And the I've setup conditional formatting like this: 

KriZo_2-1732873125398.png

 

 

Did I solve your question? Mark my post as a solution! Kudos are appreciated as well as LinkedIn endorsements.

 

174857.png

hi @KriZo 

Thanks for the help. 🙂

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors