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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
George1973
Helper V
Helper V

Link supplier to corresponding products but in terms of sales quantities

Hi All,

 

here is the problem.. I have a classic relations between Clients/Vendors another enviroment:

 

George1973_0-1638273646937.png

When I want to operate with the GOOGS supplied filtered with some specific suppliers, the relations works perfect and I can do all other calculation.

 

But when it comes to calculate some sales qualitites filtered by specific suppliers (supposing that I want to get sales for that supplier only) then the relations given above does not work. It works only if "Client_ID" plays role in "Operations" table as a Buyer..

I know that it's a obvious error.. But how to overcome it with DAX, I do not know.. Please advise ASAP 🙂  

2 ACCEPTED SOLUTIONS

Well,
I did it in very "artificial way":
1. Created a separate table summirizing only Import operations from "Operations" table with the fields "Operation ID" and "Vendor/Client_ID"
2. Created a calculated column in "Operations Details" with ValueLookup ralating the vendors ID with Goods_ID
3. Crated a seperate table summirizing only Goods_ID and Vendors_ID with no blank results from the table "Operations Details"
4. Created a calculated column in "Goods" table with LookupValue relating Goods_Id with Vendor_ID from the indipendent table from the step 3
as a result I've got the desired connection/relation.. but.. hmmm.. it's so unproffesional! 😞

Please advise more advance solution

View solution in original post

v-robertq-msft
Community Support
Community Support

Hi, 

According to your description, I can roughly understand your problem, I think you can try to change the data filter direction between table ‘Clients/Suppliers’ and table ‘Operations’ and the filter direction between table ‘Goods’ and table ‘Operations’ from “Single” to “Both” to check if the relationships can work.

vrobertqmsft_0-1638517055770.png

 

For more info, please refer to these two links:

https://docs.microsoft.com/en-us/power-bi/transform-model/desktop-relationships-understand

https://docs.microsoft.com/en-us/power-bi/transform-model/desktop-bidirectional-filtering

 

And you can get what you want.

 

If this result is not what you want, you can post some sample data(without sensitive data) and your expected result.

How to Get Your Question Answered Quickly 

Thank you very much!

 

Best Regards,

Community Support Team _Robert Qin

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

4 REPLIES 4
v-robertq-msft
Community Support
Community Support

Hi, 

According to your description, I can roughly understand your problem, I think you can try to change the data filter direction between table ‘Clients/Suppliers’ and table ‘Operations’ and the filter direction between table ‘Goods’ and table ‘Operations’ from “Single” to “Both” to check if the relationships can work.

vrobertqmsft_0-1638517055770.png

 

For more info, please refer to these two links:

https://docs.microsoft.com/en-us/power-bi/transform-model/desktop-relationships-understand

https://docs.microsoft.com/en-us/power-bi/transform-model/desktop-bidirectional-filtering

 

And you can get what you want.

 

If this result is not what you want, you can post some sample data(without sensitive data) and your expected result.

How to Get Your Question Answered Quickly 

Thank you very much!

 

Best Regards,

Community Support Team _Robert Qin

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hi,
First of all, thanks for your respond. 

The thing is that, if I change the relationship structure, I will terminate main options, measures and etc.. of the Data Set I have - It's integrated to the existng ERP system and that's why - I can not change the existing relationships.

 

So, As it seems to me the only solution so far is the one I have wrote here couple of days ago 😞

George1973
Helper V
Helper V

One of the possible solution comming to mind is - To create a calculated column in the Table "GOODS" showing related supplier and based on it filter the sales performance. But, I do not know how to do it and secondly - It seems to me somehow artificial

Well,
I did it in very "artificial way":
1. Created a separate table summirizing only Import operations from "Operations" table with the fields "Operation ID" and "Vendor/Client_ID"
2. Created a calculated column in "Operations Details" with ValueLookup ralating the vendors ID with Goods_ID
3. Crated a seperate table summirizing only Goods_ID and Vendors_ID with no blank results from the table "Operations Details"
4. Created a calculated column in "Goods" table with LookupValue relating Goods_Id with Vendor_ID from the indipendent table from the step 3
as a result I've got the desired connection/relation.. but.. hmmm.. it's so unproffesional! 😞

Please advise more advance solution

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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

Top Solution Authors