Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
Hi there,
I'm trying to create % to total calcuations between multiple tables. I'm using a Sales table and a Product Lookup table.
When I use the UPC from the sales table the Calculate AllSelected formula works fine to provide a total sales measure.
However, when I try to do the same thing using category or style attributes from the Product Lookup table, Power Bi only provides me with the total per whichever attribute I'm using.
As you can see the All Sales measure which = CALCULATE([Total $ Sales],ALLSELECTED('Aggregated Sales WTD & OH')), provides different answers. The one using the UPC from the sales table provides me with the correct answer, but the one form the lookup table does not.
Note: For some reason, I am getting a many to many relationship between the lookup and sales table; however, I've checked for duplicates and none appear to exist. The product lookup table is just massive.
The only solution I've found so far is to run Lookupvalue formulas to bring in new colums to the sales data.
Hoping someone may have an answer for me.
Thank you,
Solved! Go to Solution.
Turns out there were null values creating this issue. Problem solved.
@Graeme_Webb Glad to hear. Mark the respective reply as a solution so that others can find it as well.
I would ❤ Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make effort to give Kudos to whoever helped to solve your problem. It is a token of appreciation!
⚡ Visit us at https://perytus.com, your one-stop shop for Power BI-related projects/training/consultancy.
Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!
Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo
If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤
Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.
Turns out there were null values creating this issue. Problem solved.
@Graeme_Webb First, you have to figure out why there are many to many relationships especially when the product table should have unique id to connect to the sales table. The easiest way would be to put UPC code and count of ups from the product table in a table visual and see if there are products that have a count of more than 1, this means these are duplicates and that will help you to clear/fix your data.
Regarding measure, when you have a product dimension table, you should be using columns from the product table like UPC, category, etc etc and your measure should be ALLSELECTED ( Product Table )
I would ❤ Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make effort to give Kudos to whoever helped to solve your problem. It is a token of appreciation!
Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!
Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo
If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤
Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.
Thank you for the response @parry2k - I cannot figure out why my tables have a many to many relationship. I took the UPC's and put them into a table to count to determine if there are any duplicates, and I'm not seeing any duplication.
The excel file we're using for the product code is massive and will barely work on excel. Could the overall file size be an issue?
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!