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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more

Reply
Anonymous
Not applicable

Extract Table from a table based on a criteria

Hey Gurus,

 

I would like to extract distinct value table from another table based on a criteria.

 

Extract Distinct Names and Class, excluding Mark X.

 

Example:

 

ClassNameMark
ATina 
ASamyX
ATony 
BLina 
BFadyX
EAdam 
EGina 
ESallyX
EMarina 
ATina 
ASamyX
ATony 
BLina 
BFady 
EAdam 
EGina 
ESallyX
EMarina 
1 ACCEPTED SOLUTION
v-jingzhang
Community Support
Community Support

Hi @Anonymous 

 

If I understand it correctly, you can create a new table with below DAX.

New Table = DISTINCT(FILTER('Table', 'Table'[Mark] <> "X"))

vjingzhang_0-1673920515372.png

 

If you only want Class and Name columns in the new table, try

New Table = SELECTCOLUMNS(DISTINCT(FILTER('Table', 'Table'[Mark] <> "X")),"Class",'Table'[Class],"Name",'Table'[Name])

vjingzhang_1-1673920602598.png

Best Regards,
Community Support Team _ Jing
If this post helps, please Accept it as Solution to help other members find it.

View solution in original post

4 REPLIES 4
Ashish_Mathur
Super User
Super User

Hi,

To a Table visual, drag Class and Name.  In the Filter pane, provide a blank condition for the Mark column. 


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
v-jingzhang
Community Support
Community Support

Hi @Anonymous 

 

If I understand it correctly, you can create a new table with below DAX.

New Table = DISTINCT(FILTER('Table', 'Table'[Mark] <> "X"))

vjingzhang_0-1673920515372.png

 

If you only want Class and Name columns in the new table, try

New Table = SELECTCOLUMNS(DISTINCT(FILTER('Table', 'Table'[Mark] <> "X")),"Class",'Table'[Class],"Name",'Table'[Name])

vjingzhang_1-1673920602598.png

Best Regards,
Community Support Team _ Jing
If this post helps, please Accept it as Solution to help other members find it.

Padycosmos
Solution Sage
Solution Sage

Create a New table with using the following DAX statement and the result is in the table visual. Hope this is what is expected

Padycosmos_0-1673900286997.png

 

 

amitchandak
Super User
Super User

@Anonymous , New table

 

calculatetable(Table, Table[MArk] <> "X")

 

for visual table create a measure and use that with class and name

 

calculate(countrows(filter(Table, Table[MArk] <> "X"))

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
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!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

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.

Top Solution Authors