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

Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now

Reply
zyeet
Frequent Visitor

Comparing Values between 2 tables and displaying them using matching Date and ID's

I am retrieving data from two different sources, the point of this exercise is to check if the data retrieved from both places match. If not, a prompt is sent to the client about discrepancies in their data.

The tables have the following format:

Table 1:

zyeet_0-1702888197550.png

Table 2:

zyeet_1-1702888218756.png

 

I want to achieve a dashboard where I can view both tables' Quantities and filter them according to the Customer ID and Date, something like this:

 

zyeet_2-1702888282029.png

 

I have tried establishing a many to many relationship, but it only works on one value either ID or Date, but I would like to use both values to show the differences or discrepancies in data.

 

A link to a sample pbix file for what I am trying to achieve:

Comparison.pbix

 

 

1 ACCEPTED SOLUTION
ryan_mayu
Super User
Super User

@zyeet 

you don't need to create relationships between two tables. 

pls try this

measure = sumx(FILTER(all('Sheet1 (2)'),'Sheet1 (2)'[Customer ID]=max(Sheet1[Customer ID])&&'Sheet1 (2)'[Customer Name]=max('Sheet1'[Cus Name])),'Sheet1 (2)'[Quantity])

Measure 2 = [measure]-sum(Sheet1[Quantity])

11.PNG

pls see the attahment below





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
ryan_mayu
Super User
Super User

@zyeet 

you don't need to create relationships between two tables. 

pls try this

measure = sumx(FILTER(all('Sheet1 (2)'),'Sheet1 (2)'[Customer ID]=max(Sheet1[Customer ID])&&'Sheet1 (2)'[Customer Name]=max('Sheet1'[Cus Name])),'Sheet1 (2)'[Quantity])

Measure 2 = [measure]-sum(Sheet1[Quantity])

11.PNG

pls see the attahment below





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

Proud to be a Super User!




I tried doing this way, but it is not incorporating the date selected. The summed up measure is showing total quantity instead of quantity sold on a paticular date. 

 

zyeet_0-1702893128062.png

 

 

@zyeet 

pls see the attachment below





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

Proud to be a Super User!




Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

February Power BI Update Carousel

Power BI Monthly Update - February 2026

Check out the February 2026 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.