Qlik Community

Ask a Question

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
Become an analytics expert with Qlik's new 15 week course: Applied Data Analytics using Qlik Sense. READ MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Need help on P function

Dear all,

My code is not working. Any thoughts on why?

=sum( {$<[MEMBER ID] = P({1<[SERIE TITLE]={‘Castle’}>} [MEMBER ID])>}PRICE)

I am trying to get a list of series that people have seen who have also seen the serie Castle.

All help is appreciated!

1 Solution

Accepted Solutions
swuehl
MVP
MVP

Ok, I think there are two issues, you've used the wrong type of quotes, then you need to clear the selection in title

=sum( {$<[MEMBER ID] = P({1<[SERIE TITLE]={'Castle'}>} [MEMBER ID]),[SERIE TITLE]=>}PRICE)

a generalized expression could look like

=sum( {$<[MEMBER ID] = P(),[SERIE TITLE]=>}PRICE)

View solution in original post

6 Replies
jerem1234
Specialist II
Specialist II

The syntax of the formula seems correct. Whether or not this is the correct formula to use, I can't be sure. It seems like the p() function should get you want you want. Would you be able to post an example app, demonstrating the problem? Or some small example of what the data looks like, and what your expected output is.

Update: Also, make sure all your field names are correct.

Hope this helps!

Not applicable
Author

My whole qlikview app is very large. So I made an overview of what I am trying to accomplish and a field overview (see attachment). Does this give you more info?

swuehl
MVP
MVP

Take care of that current selections still influence your working set

=sum( {$<[MEMBER ID] = P({1<[SERIE TITLE]={‘Castle’}>} [MEMBER ID])>}PRICE)


you set member ID here, but a selection in serie title will still limit your result. So maybe clear the selection in serie title if needed:


=sum( {$<[MEMBER ID] = P({1<[SERIE TITLE]={‘Castle’}>} [MEMBER ID]), [SERIE TITLE]= >}PRICE)


or use a different set identifier:


=sum( {1<[MEMBER ID] = P({1<[SERIE TITLE]={‘Castle’}>} [MEMBER ID])>}PRICE)

Not applicable
Author

Thanks for your feedback!

But I really have no clue how to solve this. So I copied my app and deleted some tabs. Hopefully this will give you more info...

Could you please give me feedback in text as a use a personal edition...

swuehl
MVP
MVP

Ok, I think there are two issues, you've used the wrong type of quotes, then you need to clear the selection in title

=sum( {$<[MEMBER ID] = P({1<[SERIE TITLE]={'Castle'}>} [MEMBER ID]),[SERIE TITLE]=>}PRICE)

a generalized expression could look like

=sum( {$<[MEMBER ID] = P(),[SERIE TITLE]=>}PRICE)

View solution in original post

Not applicable
Author

Yeah Swuchi, it works!!!! Thank you!