Forum Discussion
dnl_8
3 years agoNew Member
Overwrite relationship filter to get other Sales
Hi, I am wondering how can I do the following: I have a table: Card CardID CompanyID Card1 Company1 Card2 Company2 Sales Card ID Customer ID Sales Card1 Customer1 ...
DOLEARY85
Resident Rockstar
3 years agoHi,
i think what you need to do is create a link table, use power query to duplicate/reference the sales table and remove all the no card rows and the sales column as below:
then set your model to have an inactive relationship from this link table to the sales table on customer id,
you should then be able to use this measure:
Measure 5 = calculate(sum(Sales[Sales]),USERELATIONSHIP('Sales Link'[Customer ID],Sales[Customer ID]))
the table will have the company ID from the card table, card id from the sales table and the measure which i put in the sales table.
hope this helps