Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

jacek_stypulkow
New Contributor

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

Re: Lost customers

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
New Contributor

Re: Lost customers

Thanks Sunny,

did it, but no change.

Jacek

Re: Lost customers

Do you see any error message shown by expression editor?

Re: Lost customers

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?

Community Browser