Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
BPetosa
Contributor II
Contributor II

"p" in set analysis

Hello Everyone,

I am attempting to count distinct session_id's that have done event 33 after already doing event 36. This is in a table visualization with segment _id as the dimension. The weird thing is it works when I query an individual segment_id, but is wrong when looking at all the segments at once. I wonder if I am missing an argument? Here is what I have:

count({<session_id = p({<event_type={36}>}) * p({<event_type={33}>}) >} distinct session_id)

Table:

segment_id                 event_type36                     formula above                          

1                                           100                                                    80 

2                                           250                                                   200

 

** the weird part is that the above is wrong. When I query segment_id = 1, I get:

     

segment_id                 event_type36                     formula above                          

1                                           100                                                    70

*This is correct when I query by individual segment.

 

any help is much appreciated.

 

Thanks,

Ben

                            

2 Replies
lironbaram
Partner - Master III
Partner - Master III

hi 

i created a formula similar to yours on a data set i have and it seems to work 

how does the fields event type and session_id and segment_id are connected 

are they all in the same table , or in different tables 

BPetosa
Contributor II
Contributor II
Author

They are all in the same table. However, they are also spread across other tables as well and this particular app is large (100+ tables). I am going to create a new app with just the main table, and see if it works then.

 

Thanks,

Ben