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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends September 15. Request your voucher.

Reply
vinaydavid
Helper III
Helper III

Mark the rows in a table as invalid based on condition ( Dax (Cal column) or M)

Hi experts,

 

I am trying to mark all the rows that that are invalid.

Please help me with Dax or M as I fairly new.

 

Col ACol BMark
WWWDon't ConsiderX
WWWConsiderX
WWWConsiderX
ABCDon't ConsiderX
ABCConsiderX
XYZConsiderOK

 

If in col B, if I find any value as "Don't Consider", then I should be able to ignore the whole bunch of rows with that ID.

 

So the result should be as column 'Mark'.

 

Thanks in advance!

1 ACCEPTED SOLUTION
VasTg
Memorable Member
Memorable Member

@vinaydavid 

 

Try this..

 

Mark =
IF (
    CALCULATE (
        MAX ( 'Table (3)'[Col B] ),
        FILTER (
            ALLEXCEPT ( 'Table (3)', 'Table (3)'[Col A] ),
            'Table (3)'[Col B] = "Don't Consider"
        )
    ) = "Don't Consider",
    "X",
    "OK"
)
 
Change the column and table names accordingly.
 
If this helps, mark it as a solution.
Kudos are good too.
Connect on LinkedIn

View solution in original post

3 REPLIES 3
VasTg
Memorable Member
Memorable Member

@vinaydavid 

 

Try this..

 

Mark =
IF (
    CALCULATE (
        MAX ( 'Table (3)'[Col B] ),
        FILTER (
            ALLEXCEPT ( 'Table (3)', 'Table (3)'[Col A] ),
            'Table (3)'[Col B] = "Don't Consider"
        )
    ) = "Don't Consider",
    "X",
    "OK"
)
 
Change the column and table names accordingly.
 
If this helps, mark it as a solution.
Kudos are good too.
Connect on LinkedIn
Anonymous
Not applicable

can I do the same condition but make in a table without add X and OK only filter the table result as a table?

Thanks a lot for the quick response VasTg.

The DAX worked in the way I want. But as I was looking at the records, I might need to add more condition in the future.

But for now, it serves my purpose.

Appreciated!! And keep up the good work 🙂

 

 

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

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