Forum Discussion
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 ?
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
5 Replies
- v-yuta-msftCommunity 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
- iamprajotResponsive Residentthanks 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.- v-yuta-msftCommunity Support
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