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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

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
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

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.

Top Solution Authors