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 @all
I have a table with the following data(Table 1) where I want to apply conditional formatting on the values in header 2 conditions if it is True.
Table 1(Dummy Data):
Header 1 | Header 2 |
A | 975 |
A | 975 |
A | 1975 |
B | 1000 |
B | 756 |
C | 250 |
Condition: If A in Header 1 repeats more than 2 times then True()
and if it is true then the background color of the values should change to a different color(eg: #FF0000)
Please help in resolving this issue.
Solved! Go to Solution.
@MintuBaruah , A In the visual not repeat unless you some ungrouped column may be header 2
But you can try like
color measure =
var _1 = calculate(coutrows(Table[header 1]), filter(allselected(Table1), Table1[Header 1] =max( Table1[Header 1]))
return
if(_1>=2, "blue", "green" )
You can use this measure in conditional formatting using field value option
How to do conditional formatting by measure and apply it on pie?: https://youtu.be/RqBb5eBf_I4
Hi @MintuBaruah ,
According to my understanding, You want to set TRUE() for Header1 with more than 2 lines, otherwise FALSE() . And then set colors for these two flag, right?
Please follow these steps:
1. Create a measure for True/False:
True or False =
var _count= CALCULATE(COUNTROWS('Table'),ALLEXCEPT('Table','Table'[Header 1]))
return IF(_count>2,TRUE(),FALSE())
2.Set colors for both:
Color = SWITCH([True or False],TRUE(),"Green", FALSE(),"Red")
3. Configure Conditional formatting for Header1:
The final output is shown below:
Best Regards,
Eyelyn Qin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @MintuBaruah ,
According to my understanding, You want to set TRUE() for Header1 with more than 2 lines, otherwise FALSE() . And then set colors for these two flag, right?
Please follow these steps:
1. Create a measure for True/False:
True or False =
var _count= CALCULATE(COUNTROWS('Table'),ALLEXCEPT('Table','Table'[Header 1]))
return IF(_count>2,TRUE(),FALSE())
2.Set colors for both:
Color = SWITCH([True or False],TRUE(),"Green", FALSE(),"Red")
3. Configure Conditional formatting for Header1:
The final output is shown below:
Best Regards,
Eyelyn Qin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
@MintuBaruah , A In the visual not repeat unless you some ungrouped column may be header 2
But you can try like
color measure =
var _1 = calculate(coutrows(Table[header 1]), filter(allselected(Table1), Table1[Header 1] =max( Table1[Header 1]))
return
if(_1>=2, "blue", "green" )
You can use this measure in conditional formatting using field value option
How to do conditional formatting by measure and apply it on pie?: https://youtu.be/RqBb5eBf_I4
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 |
---|---|
112 | |
100 | |
77 | |
74 | |
49 |
User | Count |
---|---|
146 | |
108 | |
106 | |
90 | |
62 |