This is best Fabric, Power BI, SQL and AI community event. How do we know? The last event sold out! Save €200 with code FABCMTY200.
Register nowA new Data Days event is coming soon! This time we’re going bigger than ever. Fabric, Power BI, SQL, AI and more. Don't miss out.
I have a column chart i.e. "Sales by Category", I want a measure to change the colors of all columns of Y-axis based on field parameters. In the chart, Y-axis is Field Parameter, while X-axis is Category.
I tried using the following measures;
Color Measure =
SWITCH (
SELECTEDVALUE ( 'Monthly Comparison'[Monthly Comparison Fields] ),
"Sales", "#00FF00", // Green color for Sales
"Profit", "#FF0000", // Red color for Profit
"Number of Orders", "#0000FF", // Blue color for Number of Orders
"#EB895F" // Default color for other values
)
However, no matter what field I select, I am getting default color.
Solved! Go to Solution.
Hi @Zeshansaif
Since a parameter table is a table designed for parameters, the engine does not allow you to apply conditions to it.
You simply need to add a helper column and apply the formula you wrote, which is correct in its logic, to the column you added.
Result :
The pbix with my example is attached
If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly
Thankyou so much for your help 🙂
Happy to help 🙂
Hi @Zeshansaif
Since a parameter table is a table designed for parameters, the engine does not allow you to apply conditions to it.
You simply need to add a helper column and apply the formula you wrote, which is correct in its logic, to the column you added.
Result :
The pbix with my example is attached
If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly
Check out the May 2026 Power BI update to learn about new features.
Sign up to receive a private message when registration opens and key events begin.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
| User | Count |
|---|---|
| 32 | |
| 25 | |
| 23 | |
| 22 | |
| 13 |
| User | Count |
|---|---|
| 62 | |
| 47 | |
| 27 | |
| 23 | |
| 19 |