Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
doganogulturk
Contributor
Contributor

Calculate Expression Without Dimension

hi. in my work, i'll calculate the percentage of active, passive and lost customers. i'll explain these words:

if the customer's last transaction is in the last 3 months, this customer is active. if the customer has not a transaction in the last 3 months but has in previous 3 months, he is passive. if not both, i say he is lost.

now, i want to calculate 3 numbers: how many customers are active, passive and lost.

in a straight table, i used customer id as dimension, max(date) as expression1. as expression2, if expression1 is bigger than AddMonths(date(now()),-3), i mark it 1, else 0. like that, expression3 is, if expression1 is bigger than AddMonths(date(now()),-6), i mark it 1, else 0. and finally expression4, if expression1 is bigger than AddMonths(date(now()),-12) i mark it 1 else 0.

finally sum of the expression2, 3 and 4 are the goal numbers.

but i wonder, can i calculate the count of customers?

1 Reply
Brett_Bleess
Former Employee
Former Employee

If you can attache a sample app, that may help someone provide some further guidance on this one.

Regards,
Brett

To help users find verified answers, please do not forget to use the "Accept as Solution" button on any post(s) that helped you resolve your problem or question.
I now work a compressed schedule, Tuesday, Wednesday and Thursday, so those will be the days I will reply to any follow-up posts.