Get certified in Microsoft Fabric—for free! For a limited time, the Microsoft Fabric Community team will be offering free DP-600 exam vouchers. Prepare now
Dear Members,
I Created Items basket table from python script named (Basket Analysis) through power query successfully to calculate (support,lift and confidence) this table display the basket of each two items and measure the strength of relation through (support,lift and confidence) columns.
The table is Joined with Products table through the primary key (Product No) 1:m and of course products related to sales order (1:m),
The challange is I need to calculate the total sales of Both Items in the basket table (A,B) in all orders from table (sales) considering there is no relationship between (Basket analysis) and (Sales) Table, I created one measure to do this but it is not do it correctly :
M2M Total Sales =
CALCULATE(
[Total Sales],
FILTER(
Products,
CALCULATE( COUNTROWS( 'Basket Analysis') ) > 0
)
)
I appreciate your help.
Note: Here is the Link of all resources.
https://drive.google.com/drive/folders/1Voi-Wr3IvbTptVbVui6VDQ-llIohZTbb?usp=sharing
Hi @Anonymous
You comment: "you have to have 2 relationships from Products to Basket Analysis: one to the first product, the other one to the other. One of them will be inactive."
I did the Active Relationship BTW (Index from Products into Target Item P No from Basket analysis),
For the Inactive Relationship BTW (Index from Products into Second Item P No from Basket analysis).
I need your help to show me in the second (Inactive key) how to Use (USERELATIONSHIP ) with sales (Product forign key) on the absence of any relationship between both tables (Sales and Basket Analysis), (Basket Analysis Doesn't have primary key).
Thank you.
@Anonymous Target Itme P No is the foriegin key in (Basket Analysis) , I include the resources in the thread, For the second Item (Second Item P No) , For the Measure I Include it in the Thread, Cold you help me on what sort of Modification shall I do?
@Anonymous Sorry The Primary Key is (Index) in Products table.