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

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.

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
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 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

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