Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
raju_insights
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

raju_insights
Partner - Creator III
Partner - Creator III
Author

Hi Andrew,

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

raju_insights
Partner - Creator III
Partner - Creator III
Author

Got it thanks.