March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe 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
Hi
I'd like to build a bar chart (multiple bars) with formatting colors based on range data values, like we do in Excel. How can we do that in Power BI ? Thank you
Solved! Go to Solution.
Hi @Souheyl11
Assume your table has two columns called "name", "value", then create a calculated column to define which data range each value belongs to.
data range = SWITCH(TRUE(),[value]<50, "<50",[value]>=50&&[value]<80,"50~80",[value]>=80,">=80")
Then add these columns to the Stacked column chart and go to "Format" pane ->"Data colors"
Best Regards
maggie
Hi @Souheyl11
Assume your table has two columns called "name", "value", then create a calculated column to define which data range each value belongs to.
data range = SWITCH(TRUE(),[value]<50, "<50",[value]>=50&&[value]<80,"50~80",[value]>=80,">=80")
Then add these columns to the Stacked column chart and go to "Format" pane ->"Data colors"
Best Regards
maggie
Thank you, it is a good workaround however I have severals value columns so I've to do it for each value column.
Thanks
Hi @Souheyl11
If these value columns color based on the same data range rule, when you add serveral value columns in the "value" field, they would automatically show the color with the legend.
Best Regards
Maggie
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
124 | |
89 | |
84 | |
70 | |
51 |
User | Count |
---|---|
206 | |
143 | |
97 | |
79 | |
68 |