Forum Discussion
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:
| Contx | Tempx |
| A | 1 |
| A | 2 |
| A | 3 |
| A | 4 |
| B | 1 |
| B | 2 |
| B | 3 |
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
- selimovdMost 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 regardsDenisBlog: WhatTheFact.biFollow me: twitter.com/DenSelimovic - Jos_WoolleySolution 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
- Syndicate_AdminAdministrator
Thank you! I needed it in power query precisely
- Jos_WoolleySolution Sage
You're welcome!
Regards
- AnonymousNot 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