The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
Hi all,
I want to apply conditional formatting to blank values in a matrix.
"AcitivityDurationHrs" is in a matrix and I have set up conditional formatting based on field value "ReportingBackgroundColor"
However it only applies colours where there is a value in "ActivityDurationHrs".
How am I able to do this?
Solved! Go to Solution.
Hi @henrys1995 ,
If you do not want to hardcode the color as @amitchandak mentioned,
Below are my workarounds.
1. Apply the following measure to Values field in Matrix as well:
Measure = MAX('Table'[ReportingBackgroundColor])
Please see the details:
2. Apply Font color as well as Background color:
Sum Hrs = SUM('Table'[AcitivityDurationHrs])+0
Font Color = IF([Sum Hrs]=0,MAX('Table'[ReportingBackgroundColor]),"Black")
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 @henrys1995 ,
If you do not want to hardcode the color as @amitchandak mentioned,
Below are my workarounds.
1. Apply the following measure to Values field in Matrix as well:
Measure = MAX('Table'[ReportingBackgroundColor])
Please see the details:
2. Apply Font color as well as Background color:
Sum Hrs = SUM('Table'[AcitivityDurationHrs])+0
Font Color = IF([Sum Hrs]=0,MAX('Table'[ReportingBackgroundColor]),"Black")
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.
@henrys1995 , Only in Gradient conditional formatting, you have an option. For the Field Value, You have to try by adding +0 to the measure and returning a color for 0 value
Switch(True() ,
[Measure] = 0, "Red",
[Measure] < 10, "Yellow",
"Green'
)
where Measure = sum(Table[Value])+0
@amitchandak I need the colour for blank to be whatever is stated in "ReportingBackgroundColor"
User | Count |
---|---|
80 | |
78 | |
37 | |
34 | |
31 |
User | Count |
---|---|
93 | |
81 | |
60 | |
49 | |
49 |