Skip to main content
Announcements
See why Qlik is a Leader in the 2024 Gartner® Magic Quadrant™ for Analytics & BI Platforms. Download Now
cancel
Showing results for 
Search instead for 
Did you mean: 
perla_chirag
Contributor III
Contributor III

How to pass current dimension in p() function of Set Analysis?

Hi Qlikers,

I have an expression where I use a p() function of Set Analysis.

=Count(DISTINCT {<CookieID=p({<Brand={'BrandY'}>}),Brand={'BrandX'}>}CookieID)

What I am trying to achieve here is:

- Out of those CookieIDs who have seen BrandY, I want the Count of Distinct CookieIDs who have also seen BrandX.

So the expression above works well for overall data.

When I use it in a chart, where I have Month as a dimension, it should only show CookieIDs who have seen BrandY in that month who have also seen BrandX in that same Month of the Dimension value.

So I have narrowed the problem down to this particular part of the expression, where I need your help:

CookieID=p({<Brand={'BrandY'}>})


Here, the p function returns all CookieIDs that looked at 'BrandY' over the entire time, and not just the Month in the corresponding dimension.

What should I use inside the p() function for it to consider only those CookieIDs that looked at 'BrandY' in that particular month?

Once this part is done, the expression will work as expected.


Thanks, I'm really looking forward to some insights being shared on this


12 Replies
swuehl
MVP
MVP

Ok, going off-topic

I am by default using a chronologic view of the posts,not the hierarchic view, so I apologize if I am answering questions I've not been asked (or since you haven't really asked something, just comment on everything)

Still, your points are valid and I would suggest that you repost to Community place.

perla_chirag
Contributor III
Contributor III
Author

Thanks Stefan, nothing to apologize about, I now understand that it was a misunderstanding due to the forum view.

Will post about the moderation in the Community place

Coming back to our Thread Discussion, I've put your answer into my application and am running it, will let you the results. Thanks a lot for your help!

perla_chirag
Contributor III
Contributor III
Author

Stefaaaaan! It worked like a charm!!!

This will save us a lot of time when looking at data on a User-level : Month-level.

Thanks for your help