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
caito103
Helper I
Helper I

Create new table based on Distinct of two columns from other table

Hello,

Im trying to create a new table based on a table with differents columns, but i need to use just two of them:

 

 

This table have name of the seller and the store of each transaction realized, that is why each seller and store is repeated.

But the trick is that im trying to add in this new table just EACH SELLER with his STORE and not repeat it.

 

Also, i created a new table with each store and a code, if i try to make this new table and using each row to replace, for example, each STORE name for jsut the code, how i will be able to do it? I weas thinking use SWITCH DAX formula, but i can find how to extract the data first.

 

 

 

Thank you so much!

 

 

1 ACCEPTED SOLUTION
v-yulgu-msft
Microsoft Employee
Microsoft Employee

Hi @caito103,

 

Suppose we have two basic tables: Table1 and Table2

1.PNG     2.PNG

 

Then, create a new calculated table using below formula. Also, in this new table, create a calculated column to show the code for each store.

New Table1 = SUMMARIZE(Table1,Table1[STORE],Table1[SELLER])

STORE CODE = LOOKUPVALUE(Table2[CODE],Table2[STORE],'New Table1'[STORE])

3.PNG

 

Best regards,
Yuliana Gu

Community Support Team _ Yuliana Gu
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

1 REPLY 1
v-yulgu-msft
Microsoft Employee
Microsoft Employee

Hi @caito103,

 

Suppose we have two basic tables: Table1 and Table2

1.PNG     2.PNG

 

Then, create a new calculated table using below formula. Also, in this new table, create a calculated column to show the code for each store.

New Table1 = SUMMARIZE(Table1,Table1[STORE],Table1[SELLER])

STORE CODE = LOOKUPVALUE(Table2[CODE],Table2[STORE],'New Table1'[STORE])

3.PNG

 

Best regards,
Yuliana Gu

Community Support Team _ Yuliana Gu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

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.