Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Posting on Qlik Community is temporarily paused for some users. Thank you for patience and we'll update you soon!
cancel
Showing results for 
Search instead for 
Did you mean: 
paulyeo11
Master
Master

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
sunny_talwar
MVP
MVP

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

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

View solution in original post

2 Replies
paulyeo11
Master
Master
Author

my QVF file

sunny_talwar
MVP
MVP

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

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