Skip to main content
Announcements
NEW: Seamless Public Data Sharing with Qlik's New Anonymous Access Capability: TELL ME MORE!
cancel
Showing results for 
Search instead for 
Did you mean: 
jacek_stypulkow
Contributor II
Contributor II

Lost customers

Hi,

hope you can help,

I'm looking for a number of lost customers comparing current year with previous year.

The below expression seems to be working, but it is not. It returns null.

count({<Year={'$(=max(Year)-1)'},[Customer Name]=E({<Year={'$(=max(Year))'}>}

[Customer Name])>} distinct ([Customer Name]))

Can you advise on this please?

regards

Jacek

4 Replies
sunny_talwar

Not sure if this is a typo, but you have an extra parenthesis at the end

count({<Year={'$(=max(Year)-1)'},[Customer Name]=E({<Year={'$(=max(Year))'}>}

[Customer Name])>} distinct ([Customer Name]))

Remove it and then try your expression

jacek_stypulkow
Contributor II
Contributor II
Author

Thanks Sunny,

did it, but no change.

Jacek

sunny_talwar

Do you see any error message shown by expression editor?

sunny_talwar

Also, I just realized that the parenthesis is not incorrect... you need it

Count({<Year = {$(=Max(Year)-1)}, [Customer Name] = e({<Year = {$(=Max(Year))}>} [Customer Name])>} DISTINCT [Customer Name])

But your expression looks right... would you be able to share a sample where this isn't working?