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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
srpeters
Helper I
Helper I

Filter a table

I am trying to make a new table based off of an existing one. I want to select a few columns to add to this table but filter all of them based off of one of the columns entries. In the column I am trying to use as a filter for this new table, it has Y or N. I only want to bring the rows from the first table that has Y in this column. 

 

Thank you

1 ACCEPTED SOLUTION
v-xinruzhu-msft
Community Support
Community Support

Hi @srpeters 

You can use selectcolumns() function.

e.g 

Table2 =
SELECTCOLUMNS ( FILTER ( Table1, [Y/N] = "Y" ), "a", [Column1], "b", [Column2] )

You can refer to the following link about the  function

SELECTCOLUMNS function (DAX) - DAX | Microsoft Learn

 

Best Regards!

Yolo Zhu

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

Best Regards!

Yolo Zhu

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

1 REPLY 1
v-xinruzhu-msft
Community Support
Community Support

Hi @srpeters 

You can use selectcolumns() function.

e.g 

Table2 =
SELECTCOLUMNS ( FILTER ( Table1, [Y/N] = "Y" ), "a", [Column1], "b", [Column2] )

You can refer to the following link about the  function

SELECTCOLUMNS function (DAX) - DAX | Microsoft Learn

 

Best Regards!

Yolo Zhu

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

Best Regards!

Yolo Zhu

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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