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
Anonymous
Not applicable

Filter multiple Rows with same value (in column 1) when a value (in column 2) is given

Dear all,

I need your support in writing a DAX formula.

Situation

I have a table that contains a column "Auftragsnummer" (order no.) and a column "Artikel" (article).

There can be several article lines per order no., therefore the order no. column contains the number several times:

sibeck_77_0-1660835980528.png

Goal

If the article "ZSOPA" appears in an order, then all lines with the same order no. must be filtered out.

Problem

If I solve this with normal filtering, it filters out only the one line with "ZSOPA", but all other lines with the same order no. remain.

 

Is there a good approach or a DAX formula to reach the goal?

 

Thank you for your awsome support!

1 ACCEPTED SOLUTION
ribisht17
Super User
Super User

@Anonymous 

 

For example we don't want any row with product A/ignore all the orders if it has A

Solution = IF( ISBLANK( CALCULATE(max('Ignore'[Column2]),(ALLEXCEPT('Ignore','Ignore'[Order No.])),'Ignore'[Column2]="A")),1,0)

ribisht17_0-1660839262444.png

Now you can filter 1 to get the desired output

 

 

Thanks,
Ritesh
Mark my post as a solution if it helped you| Munde and Kudis (Ladies and Gentlemen) I like your Kudos!! !!
My YT Channel Dancing With Data !! Connect on Linkedin !!Power BI for Tableau Users 

 

View solution in original post

4 REPLIES 4
jimpatel
Post Patron
Post Patron

Thanks a lot for you post. Very helpful. What should i do for other way around please?

 

That is if there is x in column 3 then solution expected to be 1 for with respective to column2 and order number please 

jimpatel_1-1707384501733.png

 

Any idea please?

 

Thanks a lot

johnt75
Super User
Super User

You could create a table like

Orders with ZSOPA = CALCULATETABLE( VALUES( 'Table'[Auftragsnummer]), 'Table'[Artikel] = "ZSOPA")

and link that in a one-to-many relationship to the main table. On visuals you could add a filter so that the 'Orders with ZSOPA'[Auftragsnummer] is blank, and if you wanted to filter inside measures you could use

My measure = CALCULATE( some calculation,
TREATAS( { BLANK()}, 'Orders with SZOPA'[Auftragsnummer] )
)
ribisht17
Super User
Super User

@Anonymous 

 

For example we don't want any row with product A/ignore all the orders if it has A

Solution = IF( ISBLANK( CALCULATE(max('Ignore'[Column2]),(ALLEXCEPT('Ignore','Ignore'[Order No.])),'Ignore'[Column2]="A")),1,0)

ribisht17_0-1660839262444.png

Now you can filter 1 to get the desired output

 

 

Thanks,
Ritesh
Mark my post as a solution if it helped you| Munde and Kudis (Ladies and Gentlemen) I like your Kudos!! !!
My YT Channel Dancing With Data !! Connect on Linkedin !!Power BI for Tableau Users 

 

Anonymous
Not applicable

Thank you @ribisht17 , this is exactly what I was looking for!

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

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.