cancel
Showing results for 
Search instead for 
Did you mean: 
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
Solution Sage
Solution Sage

@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
Solution Sage
Solution Sage

@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
PBI Sept Update Carousel

Power BI September 2023 Update

Take a look at the September 2023 Power BI update to learn more.

Learn Live

Learn Live: Event Series

Join Microsoft Reactor and learn from developers.

Top Solution Authors
Top Kudoed Authors