Qlik Community

Qlik Sense App Development

Discussion board where members can learn more about Qlik Sense App Development and Usage.

paulyeo11
Valued Contributor II

How to add year = {$(=Max(year)-1)} into my count expression ?

Hi All

I have below expression work fine :-


count(distinct(company))

I want to add, below condition to above :-

year = {$(=Max(year)-1)}

I try :-


count(year = {$(=Max(year)-1)},distinct(company))

it does not work.

Paul

1 Solution

Accepted Solutions
MVP
MVP

Re: How to add year = {$(=Max(year)-1)} into my count expression ?

Have not looked at the sample yet, but try this:

Count({<year = {$(=Max(year)-1)}>} Distinct company)

2 Replies
paulyeo11
Valued Contributor II

Re: How to add year = {$(=Max(year)-1)} into my count expression ?

my QVF file

MVP
MVP

Re: How to add year = {$(=Max(year)-1)} into my count expression ?

Have not looked at the sample yet, but try this:

Count({<year = {$(=Max(year)-1)}>} Distinct company)