Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
zzinoun
Resolver I
Resolver I

Conditional formating when blank on row

Hi,

 

I am facing an annoying issue with Conditional formating.

I have Two tables with  * to * rellationship so I created a table visual with columns from each one.

When I applied Conditional formating to highlight some values, it is only working if "show empty values" is desactived.

When I want to show non matching values as well it is only displayed when table 2 is not blank.

Exemple :

Table 1  -  Table 2 

    x              x                (Conditional formating works)

    y            blank()         (Conditional formating doesn't work)

 

How can I apply the formating on all rows even with the non matching ones (Table 1 vs table 2) ?

 

Thanks

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @zzinoun ,

 

I have a test in my side, I find that if I add column from Table1 and column from Table2 in table visual then the conditional formatting won't work for the blank cell. 

My Test:

Return Blank() won't work.

RicoZhou_0-1664953412217.png

Return "Blank" as a flag works.

RicoZhou_1-1664953430165.png

Measure 2 = 
VAR _T2 = calculate(MAX('Table 2'[T2 Column1]),FILTER(ALL('Table 2'),'Table 2'[T2 Column1] = MAX('Table 1'[T1 Column1])))
RETURN
IF( _T2 = BLANK(),"Blank",_T2)

So I suggest you to add a blank flag in blank cell from T2. Then create a color measure based on above measure.

Measure = 
IF(MAX('Table 1'[T1 Column1]) in CALCULATETABLE(VALUES('Table 2'[T2 Column1]),ALL('Table 2')),"Blue","Red")

RicoZhou_2-1664953646679.png

 

Best Regards,
Rico Zhou

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
zzinoun
Resolver I
Resolver I

Thanks @Anonymous , I will test it !

Anonymous
Not applicable

Hi @zzinoun ,

 

I have a test in my side, I find that if I add column from Table1 and column from Table2 in table visual then the conditional formatting won't work for the blank cell. 

My Test:

Return Blank() won't work.

RicoZhou_0-1664953412217.png

Return "Blank" as a flag works.

RicoZhou_1-1664953430165.png

Measure 2 = 
VAR _T2 = calculate(MAX('Table 2'[T2 Column1]),FILTER(ALL('Table 2'),'Table 2'[T2 Column1] = MAX('Table 1'[T1 Column1])))
RETURN
IF( _T2 = BLANK(),"Blank",_T2)

So I suggest you to add a blank flag in blank cell from T2. Then create a color measure based on above measure.

Measure = 
IF(MAX('Table 1'[T1 Column1]) in CALCULATETABLE(VALUES('Table 2'[T2 Column1]),ALL('Table 2')),"Blue","Red")

RicoZhou_2-1664953646679.png

 

Best Regards,
Rico Zhou

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.