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
Anonymous
Not applicable

Dax

Hi everyone,

 

I have some issues about creating a new table, 

 

I have 3 sheets from Excel and I have loaded into Power BI.

 

Sheet1 and Sheet2 are including with Name, Date and Balance, so they are basically the same thing. Sheet3 is only with Name and Age in it. So, what I am trying to do is going to creating a new table called t1, which will have Name, Date, Balance and Age in it.

 

I know how to do it in the query editor, but I want to do it just by using New table function from Modeling.

 

Also, I noticed I can use union to union sheet1 and sheet2 as they have the same number of rows. And right now, I have problem of adding sheet3 into it.

 

Thanks

1 ACCEPTED SOLUTION
v-yulgu-msft
Employee
Employee

Hi @Anonymous,

 

You could try this:

FinalTable =
ADDCOLUMNS (
    UNION ( Sheet_1, Sheet_2 ),
    "Age", LOOKUPVALUE ( Sheet_3[Age], Sheet_3[Name], [Name] )
)

Best regards,

Yuliana Gu

Community Support Team _ Yuliana Gu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

4 REPLIES 4
v-yulgu-msft
Employee
Employee

Hi @Anonymous,

 

You could try this:

FinalTable =
ADDCOLUMNS (
    UNION ( Sheet_1, Sheet_2 ),
    "Age", LOOKUPVALUE ( Sheet_3[Age], Sheet_3[Name], [Name] )
)

Best regards,

Yuliana Gu

Community Support Team _ Yuliana Gu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
Not applicable

Thanks! It works out!

Anonymous
Not applicable

Hi everyone,

 

I have some issues about creating a new table, 

 

I have 3 sheets from Excel and I have loaded into Power BI.

 

Sheet1 and Sheet2 are including with Name, Date and Balance, so they are basically the same thing. Sheet3 is only with Name and Age in it. So, what I am trying to do is going to creating a new table called t1, which will have Name, Date, Balance and Age in it.

 

I know how to do it in the query editor, but I want to do it just by using New table function from Modeling.

 

Also, I noticed I can use union to union sheet1 and sheet2 as they have the same number of rows. And right now, I have problem of adding sheet3 into it.

 

Thanks

Anonymous
Not applicable

Hi @Anonymous, 

 

As you say, you can use the UNION function to join the first two tables, then you should create a relationship between this new table and Table3 by Name, to be able to create the final table with the following formula:

 

FinalTable = ADDCOLUMNS (
    'Union';
    "Age" ; RELATED(Table3[Age])
    
)

Regards.

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.