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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
SamGeurts
New Member

Creating a new table with missing data and calculation over different tables

I am new to PowerBI, but  I have been looking around and trying to find out before spamming you. So in advance, sorry  if I am  asking the potential obvious.

I have 2 tables:  one for "Registered customers" and another one with sales from "Buying customers". I often end up with customers which were not registered but with sales, or registered customers with no sales. I need to check how on track I am with the expected sales and  take actions where needed.

My inputs tables

 

Registered customersExpected value
Customer120
Customer230
Customer340

 

Buying customersSales
Customer 110
Customer 110
Customer 110
Customer 110
customer 220
customer 220
customer 100100
customer 100100

 

I would like to generate a new table with all customers (Union + Distinct worked) as first colum, have a colomn "sales" with the sum of sales of each customer and another coulmn with the expected value, as is. The new table would look like this

New TableSalesExpected Value 
Customer 14020
customer 24030
customer 3"No sales"40
customer 100200"Anomaly?"

 

I tried creating relationship between my tables and without creating relationship, none worked so far. Appreciate any support/hint 🙂

 

1 ACCEPTED SOLUTION
Wilson_
Super User
Super User

Hey Sam,

 

I've attached a sample pbix to solve your problem.

 

Wilson__0-1723566931910.png

 

The key thing I did was to create a customer table that has a relationship with both tables. (You can right-click the Customers table and go to Edit query to see how I created that table directly from your data.)

 

Wilson__1-1723566967023.png

 

If you don't already know the terms dimension table and fact table, this wonderful course from SQLBI will be a great foundational learning for you. The bad news is your problem was indeed quite simple. However, the great news is your problem was very simple; you can have pretty easily learn the tools to solve this if you want!

 

Please feel free to ask followup questions and I will be happy to answer them. 😄


----------------------------------
If this post helps, please consider accepting it as the solution to help other members find it quickly. Also, don't forget to hit that thumbs up and subscribe! (Oh, uh, wrong platform?)

 

P.S. Need a more in-depth consultation for your Power BI data modeling or DAX issues? Feel free to hire me on Upwork or DM me directly on here! I would love to clear up your Power BI headaches.




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

Proud to be a Super User!





View solution in original post

3 REPLIES 3
Wilson_
Super User
Super User

Hey Sam,

 

I've attached a sample pbix to solve your problem.

 

Wilson__0-1723566931910.png

 

The key thing I did was to create a customer table that has a relationship with both tables. (You can right-click the Customers table and go to Edit query to see how I created that table directly from your data.)

 

Wilson__1-1723566967023.png

 

If you don't already know the terms dimension table and fact table, this wonderful course from SQLBI will be a great foundational learning for you. The bad news is your problem was indeed quite simple. However, the great news is your problem was very simple; you can have pretty easily learn the tools to solve this if you want!

 

Please feel free to ask followup questions and I will be happy to answer them. 😄


----------------------------------
If this post helps, please consider accepting it as the solution to help other members find it quickly. Also, don't forget to hit that thumbs up and subscribe! (Oh, uh, wrong platform?)

 

P.S. Need a more in-depth consultation for your Power BI data modeling or DAX issues? Feel free to hire me on Upwork or DM me directly on here! I would love to clear up your Power BI headaches.




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

Proud to be a Super User!





Thank you. That what happens when you try to be effective with a tool within one day 🙂 
 

You're welcome. I get it. I've been there! 😄




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

Proud to be a Super User!





Helpful resources

Announcements
July PBI25 Carousel

Power BI Monthly Update - July 2025

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

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 community update carousel

Fabric Community Update - June 2025

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