Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Set Analysis Troubleshooting

Hello!

I'm trying to create a chart that reflects the activity of a sales group (comprised of Persons A, B, C) but updates to reflect individuals' activities based on the selection. But when I make a selection, the chart does not change and continues to reflect Meetings for A, B, and C. Can someone help? Much appreciated!

count({$<CRM_USER_NAME={'Person A', 'Person B', 'Person C'},TYPE ={'MEETING'}>} %Fact_Key)

1 Solution

Accepted Solutions
JonnyPoole
Employee
Employee

For the SET ANALYSIS try using *=.  If you select Person A the chart will only show person A and type=meeting, If you select Person D, the chart will show nothing. Basically this returns the records that belong to the current selections AND the Selections in the modifier. So they can further reduce what is in the SET MODIFIER.

count({$<CRM_USER_NAME*={'Person A', 'Person B', 'Person C'},TYPE *={'MEETING'}>} %Fact_Key)


Is this what you want or do you want to remove the SET MODIFIER completely if a user selects a different CRM_USER_NAME or TYPE ?

View solution in original post

14 Replies
Not applicable
Author

Duplicate the column on backend use one for set analysis another one for selection. Let me know if it works.

Thank you

Suraj

Not applicable
Author

Do you know a way to solve the issue by fixing the expression, instead of touching the backend?

Not applicable
Author

The only way is without using the set analysis. Because the main purpose of set analysis is that the selections of field in set analysis doesn't impact the calculation.If you want only in expression I would use if statement: if(CRM_USER_NAME={'Person A', 'Person B', 'Person C'}, Count({<TYPE ={'MEETING'}>} %Fact_Key).

Thank you

Suraj

JonnyPoole
Employee
Employee

Would you like to see Person A, B and C  of type meeting by default, but if you make additional filter to show say just Person B, do you want it show only Person B in the chart ?

Please be very precise in what you are looking to achieve.  You may want the intersection of canned filters and dynamic filters which is possible in SET ANALYSIS.  You could also do an IF statement based on whether 1 or more fields have been selected using getselectedcount(fieldname)  for example.

Not applicable
Author

Yes, I am looking for precisely what you said.

Would you please expand on how to execute either of your suggestions?

Not applicable
Author

Try this IF(MATCH(CRM_USER_NAME, 'Person A','Person B', 'Person C'), Count({<TYPE ={'MEETING'}>} %Fact_Key))


Thanks

Suraj

JonnyPoole
Employee
Employee

For the SET ANALYSIS try using *=.  If you select Person A the chart will only show person A and type=meeting, If you select Person D, the chart will show nothing. Basically this returns the records that belong to the current selections AND the Selections in the modifier. So they can further reduce what is in the SET MODIFIER.

count({$<CRM_USER_NAME*={'Person A', 'Person B', 'Person C'},TYPE *={'MEETING'}>} %Fact_Key)


Is this what you want or do you want to remove the SET MODIFIER completely if a user selects a different CRM_USER_NAME or TYPE ?

Not applicable
Author

Nice to know about this. I didn't knew about *=.
Thanks Poole.

Thanks

Suraj

Not applicable
Author

Thank you Johnathan, this is what I want. But it seems there is a syntax error. All I've done is replace the user names with actual values... can't figure out what's wrong. Any suggestions?