Forum Discussion
Anonymous
3 years agoNot applicable
Duplicating rows from one table with rows from another table
Dear Power BI Team,
I want to produce one table that will allow to duplicate rows of one initial table (table A) with the rows from another table (table B).
In order to give you a clear picture, you will find one example below that describe the requirement :
Table A - Suppliers
| Supplier ID | Supplier Name |
| 01 | Microsoft |
| 02 | 3M |
| 03 |
Table B - Customer relationship
| Customer ID | Customer Name |
| A | George |
| B | Brian |
| C | Johnny |
Target Result table :
| Supplier ID | Supplier Name | Customer Name |
| 01 | Microsoft | George |
| 02 | 3M | George |
| 03 | George | |
| 01 | Microsoft | Brian |
| 02 | 3M | Brian |
| 03 | Brian | |
| 01 | Microsoft | Johnny |
| 02 | 3M | Johnny |
| 03 | Johnny |
Will you have any tips/formulas in order to generate such duplication of rows in Power BI using DAX ?
Thank you very much in advance for your appreciated help !
hi Anonymous
you can create a table with this:
Table =CROSSJOIN(VALUES(relationship[Customer Name]),Suppliers)it worked like this:
3 Replies
- FreemanZ
Super User
hi Anonymous
you can create a table with this:
Table =CROSSJOIN(VALUES(relationship[Customer Name]),Suppliers)it worked like this: - AnonymousNot applicable
Hello,
you can create a table with DAX
Table = CROSSJOIN(Suppliers,'Customer relationship') - AnonymousNot applicable
Hi All.
Brilliant.
Thank you for your very quick solution !!