Pivot Table ? or Or Way

HI Guys , I am trying to do a pivot table , can anyone please help .

I am a self learner , I am trying this

I have the data from 3 tables , CPR Table , DPR Table and STOCK Table …

CPR - supplier table

DPR is customer table …

I just trying to do …what product from supplier has been bought by - which customer
and at what price and when contract end for both supplier and customer. I have expected result attached and file attached . Thanks in advance

testdpr-cpr.xlsx (271.1 KB)

Can you please add this as a Power BI file.

This is where I complete all work.

Thanks, appreciate it.

Sam

Hi,

I have attached Power BI File . I am sure it something to do with the relationship - I have tried even connect the CPR directly to DPR without going thru Stock Table , but did not work .

DNA.pbix (85.4 KB)

Thank you .

This is purely relationship driven and it’s important to get your model setup correctly before moving ahead.

I recommend working through this course when you can as it covers all my best practice tips for this.

To me you also need to create some lookup table properly here.

One for suppliers, customers, dates, stock codes.

At the moment you just have your fact tables with everything in them and no logical relationships between the tables.

image

Once you do this it should become more obvious how things work when running calculations.

For example, I’ll just work something up quickly.

image

Then you could have something like this.

This is what I would be aiming for, with a date table as well.

From here it should make sense what works are what won’t.

The other to consider here is to me there is no relationship between these two column at all, so not sure what you are attempting to show here.

image

Thanks
Sam

Thanks to the contributors of this post. Due to the length by which this post has been active, we are tagging it as Solved. For further questions related to this post, please make a new thread.