Join us for an expert-led overview of the tools and concepts you'll need to pass exam PL-300. The first session starts on June 11th. See you there!
Get registeredPower BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.
I have a dataset which among other things defines colors which should be applied to columns in the visual.
This works really well in PBI desktop (and R Studio) but when I publish the report to powerbi.com the order of the colors is wrong (the columns get the wrong color).
At first it looked like the colors were sorted in alphabetical order but I was unable to reproduce that.
Using color names produced the same result as using the hex codes.
I have created a small DAX script to create test tables:
ColourNames = DataTable (
"FillColour", string,
"Value", integer,
"xLabel", integer,
{
{ "Red", 50, 1 },
{ "Gold", 30, 2 },
{ "Red", 10, 3 },
{ "Gray", 40, 4 },
{ "Red", 20, 5 }
}
)
ColourHexes = DataTable (
"FillColour", string,
"Value", integer,
"xLabel", integer,
{
{ "#ff0000", 50, 1 },
{ "#ffd700", 30, 2 },
{ "#ff0000", 10, 3 },
{ "#bebebe", 40, 4 },
{ "#ff0000", 20, 5 }
}
)
The R script for the visual is:
library(ggplot2)
ggplot( dataset, aes( x = xLabel, y = Value ) ) +
geom_col ( fill = dataset$FillColour )
This is what the graph shold look like (and what it looks like in PBI desktop)...
but in the service it looks like this.
I'm running version 2.102.845.0 64-bit of PBI desktop.
Am I doing something wrong here or is this a bug in the service?
Regards,
Steini
Hi , @SteiniJonsson
Could you share us with your pbix file(remove sensitive info) ? Maybe I can test it in my Service .
Best Regards,
Community Support Team _ Ailsa Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
48 | |
31 | |
27 | |
27 | |
26 |
User | Count |
---|---|
61 | |
56 | |
35 | |
29 | |
28 |