Forum Discussion

Syndicate_Admin's avatar
Syndicate_Admin
Administrator
5 years ago
Solved

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

  • 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

5 Replies

  • selimovd's avatar
    selimovd
    Most Valuable Professional

    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
     

     

  • 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

  • Anonymous's avatar
    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