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

Announcements
Qlik GA: Multivariate Time Series in Qlik Predict: Get Details
cancel
Showing results for 
Search instead for 
Did you mean: 
rajuamet
Partner - Creator III
Partner - Creator III

How to apply logical operators for the same field in set analysis?

Hi Techies,

For the table,

CUSTOMER_ACTIVITY:

LOAD * INLINE [

   Num, Month, Customer, Bundle

    1,Jan, A, Data

    1,Jan, B, Data

    1,Jan, B, Voice

    1,Jan, A, Voice

    2,Feb, A, Data

    2,Feb, B, Voice

    2,Feb, C, Data

    2,Feb, B, Data

    3,Mar, A, Data

    3,Mar, B, Voice

    3,Mar, C, Data

    3,Mar, C, Voice

];

Using set analysis:

1. Count of distinct customers who used only Data Bundle in each month.

2. Count of distinct customers who used only Voice Bundle in each month.

3. Count of distinct customers who used Both Data and Voice in each month.

Here I have attached a sample document.

12 Replies
effinty2112
Master
Master

Hi Rangaraju,

The second appearance of Bundle in the expression:

Concat(Distinct Bundle,'|',Bundle)

is as a sort parameter so that when the string concatenation is done we won't get 'Voice|Data' when our if statement is testing for 'Data|Voice' .


cheers


Andrew

rajuamet
Partner - Creator III
Partner - Creator III
Author

Hi Andrew,

How can I reverse the sorting? like 'Voice|Data'.

rajuamet
Partner - Creator III
Partner - Creator III
Author

Got it thanks.