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

Join the FabCon + SQLCon recap series. Up next: Power BI, Real-Time Intelligence, IQ and AI, and Data Factory take center stage. All sessions are available on-demand after the live show. Register now

Reply
Anonymous
Not applicable

Creating a Data Comparison Table From Two Different Datasets

Hi everyone, 

 

I have been asked to create a data comparison table whereas I ran against a problem I can't manage to solve. The main purpose is to see the difference between the results of the laboratory analysis of a sample. First data is being provided by an on-site facility, and the second one is being provided by an outside laboratory. You can see the data tables below.

 

KanyarGG_0-1673351771700.png 

KanyarGG_1-1673351808108.png

 

When I tried to build a comparison table everything is running smooth until I introduce the second dataset. Whenever I add laboratory measured pH values, the table fills itself with values which doesn't exist. For example, in the picture below, for 01.01.2023 DG3 it can be seen that the Laboratory_Measured_pH is equal to 5,36 whereas that is not found in our Laboratory analysis table.

KanyarGG_2-1673352063939.png

KanyarGG_3-1673352584367.png

KanyarGG_4-1673352597141.png

 

KanyarGG_0-1673352899421.png

 

 

To solve the issue, I tried the combinations between relations, created Digester Reference Table and Date Table. But nothing seems to be solved. I know that I am missing a basic fact but I didn't manage to solve hence this is my first project. 

 

Thank you for your time.

 

 

1 REPLY 1
johnt75
Super User
Super User

I would change the model. Make the relationship from Calendar to Lab Analysis 1-to-many and single direction,  make the relationship from Digester Reference Table to Lab Analysis active and delete the relationship between Lab Analysis and Factory Analysis.

Then create a few measures like

Lab analysis PH = SELECTEDVALUE( 'Lab Analysis'[ph value])

Factory analysis PH = SELECTEDVALUE( 'Factory Analysis'[ph value])

Difference = [Lab analysis PH] - [Factory analysis PH]

Then if you use columns from Calendar and Digester Reference Table on your table visual it should work.

Helpful resources

Announcements
April Power BI Update Carousel

Power BI Monthly Update - April 2026

Check out the April 2026 Power BI update to learn about new features.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

FabCon and SQLCon Highlights Carousel

FabCon & SQLCon Highlights

Experience the highlights from FabCon & SQLCon, available live and on-demand starting April 14th.