Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
narband2778
Creator II
Creator II

How to use max(date) in set analysis?

Hi,

I want to count  total "orderID" of max(date) in set analysis? Without using a variable? Is this possible?

Many Thanks,

Naresh

4 Replies
albertovarela
Partner - Specialist
Partner - Specialist

Try this: count( {$ < date = {"$(=max(date))"} > } orderID) , you may want to add a Distinct depending on your data...

narband2778
Creator II
Creator II
Author

Hi,

Thanks for the answer, I tried it but it did not work.

However the replacement of the $ sign after the curly brace  worked.

=count($ { < date = {"$(=max(date))"} > } orderID)


Thanks,

Naresh

jaimeaguilar
Partner - Specialist II
Partner - Specialist II

Hi,

sometimes happens that  you need to force date format, otherwise Set analysis doesn't recognizes numeric values:

=count($ { <date = {'$(=date(max(date)))'} > } orderID)

also just as a tip, usually single quotes are used for expanding a formula, while double quotes are used for executing searches,

regards

MK_QSL
MVP
MVP

COUNT({<date = {'$(=Max(date))'}>}Distinct OrderID)


or


COUNT({<date = {'$(=Max(date))'}>}OrderID)