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

Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now

Reply
iamprajot
Responsive Resident
Responsive Resident

SELECTCOLUMNS or Table.SelectColumns ?

Hi

I need to create a new table using columns from existing few tables and I need to know what is the best option to go for.

 

SELECTCOLUMNS

or

let

    Source = Table.SelectColumns('Original Source Name',{'Column Name','Column Name2'})

in

    Source

 

I created a new table using first option and created a Table with 1 Unique column and than created a relationship of it with rest of the tables and than added another columns using the relationship.

Or should I go for second option in which I can create a new table from 1 existing table.

 

Remember, I will be later adding some complex calculated columns to this new table.

 

Please guide which option to go for a better model and data handling ?

 

1 ACCEPTED SOLUTION

Hi iamprajot,

 

Yes, you can use DAX functions like SUMMARIZE() or ADDCOLUMNS() or ( SELECTCOLUMNS(), UNION() ) to create a custom table from exsiting tables.

 

Regards,

Jimmy Tao

View solution in original post

5 REPLIES 5
v-yuta-msft
Community Support
Community Support

Hi iamprajot,

 

Using M code can be faster that DAX, if your data in these column is large, I recommend you to use M code because M code is more efficient than DAX in data model transforming.

 

Regards,

Jimmy Tao

thanks but that is a different dimension which I am not planning to explore, right now just gonna practise DAX as learning M Code is gonna consume time and also I need to add calculated columns, retrieving values from another few tables which needs hands on on M Code.
So is there any other way to do this, create a new table containing normal columns and complex calculated columns using columns from existing few tables.

Hi iamprajot,

 

Yes, you can use DAX functions like SUMMARIZE() or ADDCOLUMNS() or ( SELECTCOLUMNS(), UNION() ) to create a custom table from exsiting tables.

 

Regards,

Jimmy Tao

CANCEL REQUEST FOR HELP

 

I figured it out.

TEST =
DISTINCT (
SELECTCOLUMNS (
FILTER ( 'Merged Tables', [Airline Name] <> BLANK () ),
"Airline Name", 'Merged Tables'[Airline Name]
)
)

Hi Jimmy Tao,

 

Great article. Big thanks for your post.


When creating a table using your guidance above, is there a way to exclue brining in blanks?

 

I've successfully used the function string in the attached image and it works. But if the column I reference has blanks, PowerBI won't create the table.

 

I'm hoping you could provide a solution where I can exclude blanks and successfully create a table.


I've tried NOT BLANK(), NOT IS BLANK, and tried using a boolean arguement (IF), but I can't figure it out.

 

 

Thx

DAX Richard

 

Create table no blanks.JPG

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

February Power BI Update Carousel

Power BI Monthly Update - February 2026

Check out the February 2026 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.