Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hello Friends,
Is it possible to create background color for column based on the other column like below table.
I have a Target and Performance column. Based on the Target ,performance column background should come.
Condition : if Performance > Target Green should come and if Performance < Target Red should come.
Target Performace
75% 30%
85% 90%
65% 70%
Thanks in advance
Solved! Go to Solution.
So, the easiest way to do this would be to create a measure like:
Indicator = VAR __target = MAX('Table'[Target]) VAR __performance = MAX('Table'[Performance]) RETURN IF(__performance < __target,"Red","Green")
Then you can base your conditional formatting off of that measure.
Hi @harib
Yes, you can do the following.
Create a measure like below, you can replace my sum aggregation with Measures.
Conditional Formatting = INT( SUM( YourTable[Performance] ) > SUM( YourTable[Target] )
In table visual, under Filters > Values, right click on the field you want to apply the formatting on and go to Conditional formatting > Background color.
Nesxt, make sure you set everything as on the screenshot below.
Let me know if you ned any extra help
Hi Mariusz,
Forgot to inform you . Performance is a measure. It's not a column. Output is not coming
If both are columns then it's working superb.
Can u please look into that .Thanks in advance
Thanks
Hi @harib
Please see the below Measure adjusted for use with Measure, the rest is the same as previous post.
Conditional Formatting = INT( [Performance] > [Target] )
So, the easiest way to do this would be to create a measure like:
Indicator = VAR __target = MAX('Table'[Target]) VAR __performance = MAX('Table'[Performance]) RETURN IF(__performance < __target,"Red","Green")
Then you can base your conditional formatting off of that measure.
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
110 | |
95 | |
76 | |
65 | |
51 |
User | Count |
---|---|
146 | |
109 | |
106 | |
88 | |
61 |