Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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.
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
Hi Andrew,
How can I reverse the sorting? like 'Voice|Data'.
Got it thanks.