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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
Anonymous
Not applicable

Conditional formating on table column not working on all rows

I have a table that I've added conditional formating as below.

However, it is not working on all rows, even though they have the same text string (it cannot be a space character on the end, because the column is calculated)

nespirito_0-1722531887541.png

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

I think it was related to having the "Show items without data" marked. When I disabled it worked.

View solution in original post

7 REPLIES 7
adudani
Super User
Super User

Hello,

Kindly provide the sample input/output in a usuable format (excel, csv, table etc.) masking sensitive information.

reference : https://community.fabric.microsoft.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447... 

 

A potential solution is using field parameters. This ill give you more control on the output ( custom functions/expressions to test the conditional formatting) . For reference: 

Write Conditional Statement Using SWITCH in DAX and Power BI - RADACAD 


Thanks,

Did I answer your question? Mark my post as a solution, this will help others!
If my response(s) assisted you in any way, don't forget to drop me a Kudos 🙂
Kind Regards,
Avinash
Anonymous
Not applicable

Hi, adudani

 

The data comes from an API, via dataflow

Here's a a sample, extracted directly from PowerBI (Iidk how to take it except like this)

https://docs.google.com/spreadsheets/d/1DZCGqkyXb_esl8gFDl3gbCEEjSUTisK6/edit?usp=sharing&ouid=10353...

 

Here's also another example of how it is looking:

nespirito_0-1722539299152.png

 

I is occurring on several columns, but here's one example of the DAX of one them:

 

_Calculated_InvestigationLevelCheck = 
IF(RIGHT([CaseType L1],8) = "Incident",
IF(
    OR(
        OR(
            AND(
                [InvestigationLevel]="Level 3",
                [RiskArea Int]<3
            ),
            AND(
                [InvestigationLevel]="Level 2",
                [RiskArea Int]<2
            )
        ),
        AND(
            [InvestigationLevel]="Level 3",
            [AuthorityNotifiedName]="ANP (Brazilian Petroleum Agency)"
        )
    ),
    "Investigation Level Incorrect",
    "Investigation Level correct"
),
BLANK()
)

 

I did try to use the SWITCH function as you suggested, but it is still behaving weird: 

_Calculated_AuthorityNotifiedCheck = 
SWITCH(RIGHT([CaseType L1],8),"Incident",
SWITCH(
    TRUE(),
    AND(
        [AuthorityNotified] = "Authority not Notified",
        ISTEXT([AuthorityNotifiedName])
    ),
    "Error on Authority Notified",
    "Authority Notified correct"
),
BLANK()
)

 

If there's any other info I can send, let me know.

 

Thanks.

Is this the expected output? ( the CF measure can be applied to all other column cell elements if required)

adudani_0-1722541031862.png

 



Did I answer your question? Mark my post as a solution, this will help others!
If my response(s) assisted you in any way, don't forget to drop me a Kudos 🙂
Kind Regards,
Avinash
Anonymous
Not applicable

I think it was related to having the "Show items without data" marked. When I disabled it worked.

Anonymous
Not applicable

Actually no. I need differenc CF for each column.

The problem for me is that it is only working for a few rows.

 

But should I try using Measures to base the CF instead of the columns itself?

The switch logic provided in the pbix file will enable you to create different CF measures for different columns.  The screenshot above is to demonstrate that the function will work for all rows in the selected column.

Did I answer your question? Mark my post as a solution, this will help others!
If my response(s) assisted you in any way, don't forget to drop me a Kudos 🙂
Kind Regards,
Avinash
Anonymous
Not applicable

Got it, but unfortunatelly it is still only working for a few rows.

nespirito_0-1722543453386.png

nespirito_1-1722543471617.png

nespirito_2-1722543494174.png

 

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.