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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
Coffeinalytics
Regular Visitor

Creating a table of columns from another table

Hi, I just started learning power BI and I have a question that might seem silly but I would appreciate if anyone could help me.

 

So, I have a table that has too many information, and some columns, even tho they are related, would be easier to read if they were in a different table.

 

Table.pngtable2.png

My idea was to create a "details" table from columns that can be quantified, like "price", "miles", "driver" and I was able to achieve what I wanted using "reference", however, I wonder if there is a way to reach the same results with coding.

Also, if I was to create a relationship between both tables, Should I create an index column in the original table and then use it as a foreign key in the new table?

 

I don't know if my logic is broken, but I hope you guys can understand.

 

Thank you!

 

1 ACCEPTED SOLUTION
Bipin-Lala
Super User
Super User

Hi @Coffeinalytics,

 

One method you have already mentioned for creating a table out of another table is reference or duplicate in query editor. Then you can Choose Columns from the reference/ duplicate table and proceed

 

BipinLala_0-1712357540590.png

Another method is to use DAX in Data tab to create a table with specified columns.

BipinLala_1-1712357718102.png

https://dax.guide/selectcolumns/

https://learn.microsoft.com/en-us/dax/selectcolumns-function-dax

 

Though doing such transformation in M code/ query editor is usually faster and more beneficial than using DAX.




Did I answer your question? Mark my post as a solution!

Proud to be a Super User!


Regards,

Bipin Lala | Business Intelligence Developer



View solution in original post

2 REPLIES 2
Bipin-Lala
Super User
Super User

Hi @Coffeinalytics,

 

One method you have already mentioned for creating a table out of another table is reference or duplicate in query editor. Then you can Choose Columns from the reference/ duplicate table and proceed

 

BipinLala_0-1712357540590.png

Another method is to use DAX in Data tab to create a table with specified columns.

BipinLala_1-1712357718102.png

https://dax.guide/selectcolumns/

https://learn.microsoft.com/en-us/dax/selectcolumns-function-dax

 

Though doing such transformation in M code/ query editor is usually faster and more beneficial than using DAX.




Did I answer your question? Mark my post as a solution!

Proud to be a Super User!


Regards,

Bipin Lala | Business Intelligence Developer



amitchandak
Super User
Super User

@Coffeinalytics , Power Query Duplicate the table remove a column, and remove the duplicate to create a header. Add an index column in this header table

 

Use the merge table to join the header with details with no keys and populate the index column to join in the Power BI model.

 

Throwback- Power BI: Power Query Functions one must know
: https://www.youtube.com/watch?v=cN8AO3_vmlY&t=36407s
Power BI - Cheat Sheet: Power Query Functions one must know
https://amitchandak.medium.com/cheat-sheet-power-query-functions-one-must-know-a8531b6e321a

Join us as experts from around the world come together to shape the future of data and AI!
At the Microsoft Analytics Community Conference, global leaders and influential voices are stepping up to share their knowledge and help you master the latest in Microsoft Fabric, Copilot, and Purview.
️ November 12th-14th, 2024
 Online Event
Register Here

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.