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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
Anonymous
Not applicable

how to get a tabular table

Hello! I have an issue joining two tables created by DAX. I tried different functions but none gave me the correct result and I am stuck right now...

 

My first table represents the product sales grouped by how many units customers used to purchase in the same shopping cart. For instance, 5 orders bought just one unit of product 3c in the same purchase:

 

product idquantitynumber of orders
3c15
3c26
3c33
r514
r523
r534
b112
b121

 

My second  table represents all components of a product. For instance, product 3c is composed of 2 components: 2 units of 7uu and 1 unit of 4aa:

 

product idcomponent idunits
3c7uu2
3c4aa1
r5r52
b1r51
b17uu4

 

My target is to achieve the following table:

 

product idcomponent idquantitynumber of ordersunits
3c7uu152
3c7uu252
3c7uu352
3c4aa161
3c4aa261
3c4aa361
r5r5142
r5r5242
r5r5342
b1r5121
b1r5221
b17uu114
b17uu214

 

May anyone help me please?

1 ACCEPTED SOLUTION
v-zhenbw-msft
Community Support
Community Support

Hi @Anonymous ,

 

We are a little confused about your desire table. Why the “3c” ’s number of orders is 5 and 6? Could you please tell us the logic of calculation?

 

If the “3c” ‘s number of orders is 5, 6 and 3,  you can refer the following ways.

 

1. Create a both relationship between table 1 and table 2 based on [product id].

 

H 1.jpg

 

2. Then we can create a table visual like this,

 

H 2.jpg

 

If it doesn’t meet your requirement, could you please show the exact expected result based on the table that you have shared?

BTW, pbix as attached.

 

Best regards,

 

Community Support Team _ zhenbw

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

2 REPLIES 2
v-zhenbw-msft
Community Support
Community Support

Hi @Anonymous ,

 

We are a little confused about your desire table. Why the “3c” ’s number of orders is 5 and 6? Could you please tell us the logic of calculation?

 

If the “3c” ‘s number of orders is 5, 6 and 3,  you can refer the following ways.

 

1. Create a both relationship between table 1 and table 2 based on [product id].

 

H 1.jpg

 

2. Then we can create a table visual like this,

 

H 2.jpg

 

If it doesn’t meet your requirement, could you please show the exact expected result based on the table that you have shared?

BTW, pbix as attached.

 

Best regards,

 

Community Support Team _ zhenbw

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Anonymous
Not applicable

Yes, you are right, my desire table is missing 3 Quantity for 3c product.

 

Your solution is also correct!

 

Thanks a million

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Prices go up Feb. 11th.

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

Jan NL Carousel

Fabric Community Update - January 2025

Find out what's new and trending in the Fabric community.