Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
so you will have all permutations of two items based on the invoice number (use month-year if the conditional probability looks weird with invoice number)
e.g.
Invoice No. 233, Milk and Egg
Invoice No. 234, Egg and Milk
Invoice No. 235, Egg and Milk
Given Egg, what is the probability of Milk?
For this to happen I think you need to play with the load script to generate the permutations
achieve these
If your product list is really that well structured with " and " you can parse out the individual products with SubField:
Load *,
SubField(Products, ' and ') as Product
Inline [
Invoice, Products
Invoice No. 233, Milk and Egg
Invoice No. 234, Egg and Milk
Invoice No. 235, Egg and Milk
Invoice No. 236, Egg
Invoice No. 237, Egg and Milk and Bananna
];
You can then calculate the product counts and ratios using that data.
-Rob
It it just example in my model many invoce and product
There is no limit on numbers of Invoices or Products in the solution I proposed. The only limitation I questioned was the actual format of the Products list.
-Rob
why we use inline load ?? in my dashboard one column for invoice no and other is product_name so for each invoice no of product like for 1 invoice there are 2 ,3 , 4 on products so i want conditional probability ...
Eg. if inv no 1 has product 1. 2. 3
then whats probability of 1 given 2 , 1 given 3 , 2 given 1 , 2 given 3, 3 given 1 , 3 given 2
I was using Inline load only to demonstrate with data. The Load Inline has nothing to do with the proposed solution was to use Subfield() function in the load script to break product_name down into individual products. SubField() is not available as a chart function, so you would need to do this preprocessing in the script.
Once you have the individual products you still need to do the arithmetic to calculate probability, but it will be easier.
-Rob