Qlik Community

Ask a Question

QlikView Creating Analytics

Discussion Board for collaboration related to Creating Analytics for QlikView.

Announcements
Qlik Highlights 2020 Giveaway! Watch, reply and have a chance to win a $200 Amazon Gift Card! Watch Video
cancel
Showing results for 
Search instead for 
Did you mean: 
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
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
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