Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

p function in set analysis

Hi

I am using following set analysis and noticed that the bolded line of code is not interpreting. Could someone guide as to what I am missing here? Qlik sense is not throwing any code error but it is just not interpreting this line of code..!

Sum({1 < rating_analyst_code = {$(=rating_analyst_code)},

              security_id_effective_date2 = p(security_id_effective_date), //As user selects effective date, security_id_effective_date gets                                                                                                              filtered with stocks & effective date combinations which is passed                                                                                                          into security_id_effective_date2

              history_rating_analyst_code = p(rating_analyst_code),       //As user selects rating_analyst_code it is passed into                                                                                                                            history_rating_analyst_code. This enables filtering down to                                                                                                                   stocks covered by the analyst at a point in time.

                parent_clone_type={'Parent'}

      >}

benchmark_contrib_mktval_weight)

Thanks

4 Replies
sunny_talwar

I am guessing that the only bold part of the set analysis isn't working the way you would expect? Have you tried using just that as your set analysis and see if it work the way you would expect?

Sum({1<history_rating_analyst_code = p(rating_analyst_code), rating_analyst_code>} benchmark_contrib_mktval_weight)

Is the above working properly with user selection in rating_analyst code?

swuehl
MVP
MVP

You are setting the same value to rating_analyst_code and history_rating_analyst_code, is this what you want?

If you make the selections in filter pane with just sum(benchmark_contrib_mktval_weight) as expression, do you get the correct result?

It's quite hard to answer why something is not working, without knowing the context. If possible, post a small sample.

Not applicable
Author

Hi Sunny

Not sure what you meant, but i am very sure that the defect lies in the highlighted line of code in post earlier. i.e.the line below is not interpreting.

history_rating_analyst_code = p(rating_analyst_code),  


Thanks

Not applicable
Author

Hi Swuehl

Yes, i need to set the same value to rating_analyst_code and history_rating_analyst_code.

This is because of the way the data model is structured.

If you make the selections in filter pane with just sum(benchmark_contrib_mktval_weight) as expression, do you get the correct result?

Yes


Unfortunately can't share the data model but the problem is clear, i.e. the following line of code is not interpreting.


history_rating_analyst_code = p(rating_analyst_code)


The complete set analysis code is as follows.


Sum({1 <   parent_clone_type={'Parent'},

                 history_rating_contact_id = p(rating_contact_id),

                 security_id_effective_date2 = p(security_id_effective_date)

        >}

benchmark_contrib_mktval_weight)