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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
KCB
New Member

Need help to solve a problem with fetching multiple values for each single value

Hello everyone,

 

I have a problem I need help with.

 

I have 2 tables, 1 table has all the item numbers and 1 table has all the customer numbers, in this case, I wish to be able to get all item numbers for each customer using DAX.

 

 

Example:

 

Table 1               Table 2                  Result 

 

A                         1                           A 1

B                         2                           A 2

C                         3                           A 3   

D                         4                           A 4  

                                                        B 1

                                                        B 2   

                                                        B 3  

                                                        B 4

                                                        C 1

                                                        C 2   

                                                        C 3  

                                                        C 4

                                                        D 1

                                                        D 2   

                                                        D 3  

                                                        D 4

 

 

All help would be very appreciated here 🙂

1 ACCEPTED SOLUTION
Fowmy
Super User
Super User

@KCB 

Go to the modeling tab and click on New Table and try the following code, rename table and column names. as per our model

 


NEW TABLE = 


GENERATE(
 VALUES(TABLE1[CUSTOMER NUMBER]),
 VALUES(TABLE2[ITEM NUMBER])
)

________________________

If my answer was helpful, please consider Accept it as the solution to help the other members find it

Click on the Thumbs-Up icon if you like this reply 🙂

YouTube  LinkedIn

Did I answer your question? Mark my post as a solution! and hit thumbs up


Subscribe and learn Power BI from these videos

Website LinkedIn PBI User Group

View solution in original post

4 REPLIES 4
Fowmy
Super User
Super User

@KCB 

Go to the modeling tab and click on New Table and try the following code, rename table and column names. as per our model

 


NEW TABLE = 


GENERATE(
 VALUES(TABLE1[CUSTOMER NUMBER]),
 VALUES(TABLE2[ITEM NUMBER])
)

________________________

If my answer was helpful, please consider Accept it as the solution to help the other members find it

Click on the Thumbs-Up icon if you like this reply 🙂

YouTube  LinkedIn

Did I answer your question? Mark my post as a solution! and hit thumbs up


Subscribe and learn Power BI from these videos

Website LinkedIn PBI User Group

Thank you for your fast replay,

 

This worked so then I have 2 follow up questions to this method.

 

1. Will this table now update itself when I update the customer table and the product table?

2. is it possible to do this using a measure to save space?

 

thank you so much for your help so far :).

@KCB 

For
Q # 1, Yes, it will get updated,
Q#2, I recommend you to use a table instead of measure as I shared, it will not consume much space as you have two columns.

 

________________________

If my answer was helpful, please consider Accept it as the solution to help the other members find it

Click on the Thumbs-Up icon if you like this reply 🙂

YouTube  LinkedIn

Did I answer your question? Mark my post as a solution! and hit thumbs up


Subscribe and learn Power BI from these videos

Website LinkedIn PBI User Group

Okay, I see :).

 

Thank you for your help and have a still lovely day.

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.