Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
Hi community,
I am sharing my Pbix file here.
I am trying to apply different Background colors on Matrix.
Here is my demo:
Currently, this Matrix has two parts.
Left side is Actual and right three columns are Estimate based on logic.
When I try to do the Conditional formating on the Value, it does not give me an option to choose either "Actual" or "Estimate".
It only gives me an option of Count and Distinct Count.
What I am trying to do is apply different background colors on Value depedning output of BudgetType is "Actual" or "Estimte".
How do we go about doing it with current model?
Thank you.
Solved! Go to Solution.
You can write a measure to check on the BudgetType[ActualOrEstimated] and return a color string like this.
Value Format =
VAR _Type = SELECTEDVALUE ( BudgetType[ActualOrEstimated] )
RETURN
SWITCH (
TRUE (),
_Type = "Actual", "Green",
_Type = "Estimate", "Red"
)
Then apply conditional formatting to the Values background based on the Field value of the measure:
You can use color hex values instead also.
Value Format =
VAR _Type = SELECTEDVALUE ( BudgetType[ActualOrEstimated] )
RETURN
SWITCH (
TRUE (),
_Type = "Actual", "#34A853",
_Type = "Estimate", "#EA4335"
)
You can write a measure to check on the BudgetType[ActualOrEstimated] and return a color string like this.
Value Format =
VAR _Type = SELECTEDVALUE ( BudgetType[ActualOrEstimated] )
RETURN
SWITCH (
TRUE (),
_Type = "Actual", "Green",
_Type = "Estimate", "Red"
)
Then apply conditional formatting to the Values background based on the Field value of the measure:
You can use color hex values instead also.
Value Format =
VAR _Type = SELECTEDVALUE ( BudgetType[ActualOrEstimated] )
RETURN
SWITCH (
TRUE (),
_Type = "Actual", "#34A853",
_Type = "Estimate", "#EA4335"
)
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 |
---|---|
77 | |
74 | |
57 | |
40 | |
33 |
User | Count |
---|---|
70 | |
63 | |
57 | |
49 | |
46 |