Cannot Determine Relationship Between Two Fields

Hi
I have a data model which has multiple Fact tables and relationships seem to be set up nicely but I cannot marry columns across the fact table via its conformed dimensions. I have attached my model
When I bring in fields across the fact tables I get the error as seen in the image below:

My model:
Epic Model.pbix (124.4 KB)
I anticipate your reply.
Thank you

Hello @upwardD,

Thank You for posting your query onto the Forum.

Can you also please provide the Excel file which has been used for loading the data in the Power BI?

Thanks and Warm Regards,
Harsh

Hello @upwardD,

As you mentioned that, you were not able to create a relationship between the Fact Tables and than you dragged individual columns from the two different fact tables. So how can you expect to show the results when there’s no relationship established at all.

Why don’t you make use of Dimension Table (Dates Table) with which both the tables are already connected.

Also what’re you trying to achieve by dragging fields from the Fact Tables rather than Dimension Tables with which relationships are already established.

Thanks and Warm Regards,
Harsh

Thank you @Harsh
The Excel file:
Epic Data.xlsx (33.6 KB)
Thank you

Hello @upwardD,

Thank You for providing the Excel file but it would be great if you can shed some light on my previous post that I created. About why are you trying to use fields from the Fact Table and what results are you looking for?

Another thing is, when you are dragging the fields from the fact table are you considering “Camp Code ID” field as a common source that acts as a base between these two tables?

Thanks and Warm Regards,
Harsh

Hi @Harsh,
The tables are related and a relationship is formed too as you would see in the model view. Camp Code ID has a relationship with Camp and Epic table. I am dragging fields from but Fact tables because of the information users will want to analyse using the model. What I am trying to achieve is to make the model work perfectly so information is easily assessed from both Fact table.
I do really need your help as I do not know how else to make the model work as users expect.
Thank you

Hi there,

It would be to combine some data using Power Query Editor.

Please follow the below links:

Good luck.

Hello @upwardD,

Ok, so this were the fields entered in the table visualization -

Fields Entered Into The Table Visualization

“Camp Code ID has a relationship with Camp and Epic table.” — Right, it has relationship with the fact tables. Fact Tables amongst themselves are not linked with each other so you actually cannot expect the results to be showcased.

So what you’ll be required to do is merge the queries based on the “Camp Code ID” field which is common between both the tables and obtain the records of “Epic Start Date” into the Camp Table. So that when you drag and drop the same fields into the visualization they don’t show the error anymore.

But as you can see in the above screenshot not all the records of the “Camp Code ID” is getting matched. Only 36 records out of 50 are getting matched. Now, click on OK and etxract the “Start Date” field and click on “Close and Apply” button.

Now, you can drag the same fields that you were using earlier into the table visualization and it won’t show the error.

Now, since only partial records were matched i.e. only 36 out of 50 remaining are shown as blanks. If you don’t want to showcase the blank one’s than from the FILTER PANE you can eliminate or un-check the Blank option and now only 36 records which were traced/matched between both the tables will be showcased as the results. Below is the screenshot provided for the reference -

Eliminate Blanks

I’m also attaching the working of the PBIX file for the reference.

Hoping you find this useful and meets your requirements that you’ve been looking for. :slightly_smiling_face:

Note: In your file, it was observed that you’ve combined “Date and Time” which is not recommended. And therefore, I’ve split the columns and created individual columns for “Date” and other one for “Time”.

Thanks and Warm Regards,
Harsh

Epic Model Data.xlsx (34.8 KB)

Data Model Transformation.pbix (1.1 MB)

1 Like

@Harsh, you have helped saved a lot of trouble. Thank you so very much. The model now up and running for users.

Hello @upwardD,

You’re Welcome. :slightly_smiling_face:

I’m so glad that I was able to assist you and happy to hear that you were able to submit your model in time. :+1:

Thanks and Warm Regards,
Harsh

1 Like