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

using P E for market basket analysis

hi all

 

in my model i transaction table 

with fields : id, item, quantity ... etc.

loaded this table again with the fields : id, item_1

so the connection between the main table and the secondary is id.

in UI i want to use an expression to  count (id) and sum (quantity) of all other items from the user selection in item_1

 

any ideas ?

 

advanced thanks

Labels (5)
1 Solution

Accepted Solutions
Akhil_Reddy
Contributor III
Contributor III

=count( {< id= e( {<item_1= {'$(=GetFieldSelections(item_1))'} >} ),item_1= >} id)

=sum( {< id= e( {<item_1= {'$(=GetFieldSelections(item_1))'} >} ),item_1= >} quantity)

View solution in original post

1 Reply
Akhil_Reddy
Contributor III
Contributor III

=count( {< id= e( {<item_1= {'$(=GetFieldSelections(item_1))'} >} ),item_1= >} id)

=sum( {< id= e( {<item_1= {'$(=GetFieldSelections(item_1))'} >} ),item_1= >} quantity)