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

Get certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. Register now

Reply
a22
Frequent Visitor

New column in new table based on values of other tables

Hello, I tried posting on here earlier but can't see it anymore. Say I have two tables, Table 1 and Table 2.

 

Table 1

ShopYearLine itemValue
Shop A2022current assets total307125
Shop B2020CA total current assets19076

 

Table 2

Line itemNew name
CA total current assetsTotal current assets
current assets totalTotal current assets

 

For context, I am using table 2 to rename the line items in table 1. How do I use DAX to make a new table, Table 3, that looks like:

 

ShopYearTotal current assets
Shop A2022307125
Shop B202019076
1 ACCEPTED SOLUTION
Mahesh0016
Super User
Super User

@a22  Power Bi Desktop > Go to Modeling tab > Click On New Table > Paste  this code.

Mahesh0016_0-1683119440875.png

Table C =
SELECTCOLUMNS (
    'Table A',
    "Shop", 'Table A'[Shop],
    "Year", 'Table A'[Year],
    "Total current assets", 'Table A'[Value]
)

View solution in original post

1 REPLY 1
Mahesh0016
Super User
Super User

@a22  Power Bi Desktop > Go to Modeling tab > Click On New Table > Paste  this code.

Mahesh0016_0-1683119440875.png

Table C =
SELECTCOLUMNS (
    'Table A',
    "Shop", 'Table A'[Shop],
    "Year", 'Table A'[Year],
    "Total current assets", 'Table A'[Value]
)

Helpful resources

Announcements
November Carousel

Fabric Community Update - November 2024

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

Live Sessions with Fabric DB

Be one of the first to start using Fabric Databases

Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.

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! Early Bird pricing ends December 9th.

Nov PBI Update Carousel

Power BI Monthly Update - November 2024

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