Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Posting on Qlik Community is temporarily paused. Thank you for patience and we'll update you soon!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Suggest me the set analysis format for If statement

Hi,

Suggest me the set analysis format for the below If statement

if(only(ActivityFeedTask_Type__c)='Call', 'Call'  & ' ( ' & count(ActivityFeedTask_Type__c)& ' ) ',

if(only(ActivityFeedTask_Type__c)='SalesApp activity', 'SalesApp Activity'  & ' ( ' & count(ActivityFeedTask_Type__c)& ' ) '

)

)

For improving the perfomacne i want present this expression with Set Analysis

In-Advance

Thank You

Labels (1)
1 Solution

Accepted Solutions
Kushal_Chawda
MVP
MVP

Instead of IF you can use, Pick, match with set analysis

pick(match(ActivityFeedTask_Type__c,'Call','SalesApp activity'),

ActivityFeedTask_Type__c&'('&count({<ActivityFeedTask_Type__c={'Call'}>}ActivityFeedTask_Type__c)&')',

ActivityFeedTask_Type__c&'('&count({<ActivityFeedTask_Type__c={'SalesApp activity'}>}ActivityFeedTask_Type__c)&')')

View solution in original post

5 Replies
Kushal_Chawda
MVP
MVP

Are you using ActivityFeedTask_Type__c in Dimesion?

Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

Set analysis can't do branching, only filtering. That means your nested if statement cannot be translated into a set analysis expression.


talk is cheap, supply exceeds demand
jonathandienst
Partner - Champion III
Partner - Champion III

Set analysis is for filtering and selecting data. It is not a universal replacement for if statements.

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
Kushal_Chawda
MVP
MVP

Instead of IF you can use, Pick, match with set analysis

pick(match(ActivityFeedTask_Type__c,'Call','SalesApp activity'),

ActivityFeedTask_Type__c&'('&count({<ActivityFeedTask_Type__c={'Call'}>}ActivityFeedTask_Type__c)&')',

ActivityFeedTask_Type__c&'('&count({<ActivityFeedTask_Type__c={'SalesApp activity'}>}ActivityFeedTask_Type__c)&')')

Anonymous
Not applicable
Author

Thank you Exprerts for the Promt response