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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
jagjivvt
Creator
Creator

Expression issue with max and date

Hi,

if i use =max(Date)-7 in the label it works, but when i use the same in set analysis no values are being shown.

count($<{Date={"$(=max(Date)-7)"}>} Distinct Names)

result should be the number of names for max Date.

help please

thanks

1 Solution

Accepted Solutions
swuehl
MVP
MVP

Try to format according your Date field format:

count($<{Date={"$(=Date(max(Date)-7))"}>} Distinct Names)

View solution in original post

5 Replies
marcus_sommer

You need probably a date-formating like:

count($<{Date={"$(=date(max(Date)-7, 'YourDateFormat')"}>} Distinct Names)

- Marcus

sunny_talwar

Try this:

Count($<{Date={"$(=Date(Max(Date)-7, 'YourDateFieldFormatHere'))"}>} Distinct Names)

swuehl
MVP
MVP

Try to format according your Date field format:

count($<{Date={"$(=Date(max(Date)-7))"}>} Distinct Names)

Not applicable

Vijay, Max function return the number value for date and you need to convert into your date format.

count($<{Date={"$(=date(max(Date)-7, 'YourDateFormat')"}>} [Distinct Names])

sunny_talwar

Your Set Analysis brackets are also not in correct places. Try this:

Count({$<Date={"$(=Date(Max(Date)-7, 'YourDateFieldFormatHere'))"}>} Distinct Names)