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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
redalert787
Helper II
Helper II

Avoiding double values using relational tables in power pivot tables

Hello, 

 

I'm trying to use power query and power pivot to build relationtional tables and make dashboards in excel. I've done the step of making unique tables to connect the dimensions so there are no many to many relationships. However, if I want to use one of those dimensions and bring it in as a row in a pivot table, then bring in the value from 2 of the relational tables, I have to bring them in as two seperate values and it creates two columns. 

 

For example, if I want to look at sales by week for both retail stores and ecommerce, that each have their own database/table in power query. I am connecting the tables using week in the rows (dimensions) but for sales I have to bring in the sales from both the retail and ecommerce tables and that creates two rows in the values column where I only want one. 

 

Any thoughts? Am I missing something easy?

 

Thanks, 

2 REPLIES 2
v-kelly-msft
Community Support
Community Support

Hi @redalert787 ,

 

Try to use Table.Distinct function to realize it.

Below is the reference:

https://docs.microsoft.com/en-us/powerquery-m/table-distinct

 

Below thread can be taken for instance:

https://community.powerbi.com/t5/Desktop/Duplicates-returned-with-Table-Distinct-in-M-Query/m-p/6964...

 

Best Regards,
Kelly

Did I answer your question? Mark my post as a solution!

Jimmy801
Community Champion
Community Champion

Hello @redalert787 

 

probably you have to write some custom measures or create some more relationships. But I still don't have any idea how your datamodel looks like and what your expected output is. If you could post some screenshots of your datamodel, maybe we are able to help, or to share some excel file with dummies, where we could work on

 

BR

 

Jimmy

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

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.