Forum Discussion

zzinoun's avatar
zzinoun
Resolver I
3 years ago
Solved

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

  • Anonymous's avatar
    Anonymous
    3 years ago

    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.

    Return "Blank" as a flag works.

    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")

     

    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.

2 Replies

  • Anonymous's avatar
    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.

    Return "Blank" as a flag works.

    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")

     

    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.