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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
Syndicate_Admin
Administrator
Administrator

Merge for each row

Hello, I have two tables:

Account
A
B
C
D

y

Temp
1
2
3
4

How could you do to merge them and make it:

ContxTempx
A1
A2
A3
A4
B1
B2
B3

I can't do the table manually because the second table I have has more than 400 rows

1 ACCEPTED SOLUTION
Jos_Woolley
Solution Sage
Solution Sage

I'd personally prefer to do that in Power Query. Add these lines at the appropriate point in the Account query (or create as new, as desired):

 

    #"Added Custom" = Table.AddColumn(Source, "Custom", each Temp),
    #"Expanded Custom" = Table.ExpandTableColumn(#"Added Custom", "Custom", {"Temp"}, {"Temp"})

 

where Temp is the name of the other query.

Regards

View solution in original post

5 REPLIES 5
Anonymous
Not applicable

I have a problem I have an excel table with timers and measurements normally it must go from one row to another after 15 min but there are phases or it goes to 5 min and I want to merge each 3 rows of 5 min by making calclus for each column for example the maximum of the three values or the sum of the 3 according to the parameters

 

Jos_Woolley
Solution Sage
Solution Sage

I'd personally prefer to do that in Power Query. Add these lines at the appropriate point in the Account query (or create as new, as desired):

 

    #"Added Custom" = Table.AddColumn(Source, "Custom", each Temp),
    #"Expanded Custom" = Table.ExpandTableColumn(#"Added Custom", "Custom", {"Temp"}, {"Temp"})

 

where Temp is the name of the other query.

Regards

Thank you! I needed it in power query precisely

You're welcome!

Regards

selimovd
Super User
Super User

Hey @Syndicate_Admin ,

 

you can do that with a DAX table and then CROSSJOIN function.

Add a new DAX table with the following formula:

CrossJoin Table = CROSSJOIN(Account, Temp)

 

If you need any help please let me know.
If I answered your question I would be happy if you could mark my post as a solution ✔️ and give it a thumbs up 👍
 
Best regards
Denis
 

 

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

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.