Skip to main content
Announcements
See why Qlik is a Leader in the 2024 Gartner® Magic Quadrant™ for Analytics & BI Platforms. Download Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

function inside set analysis inside another set analysis

Hello,

I need to have something like this:

count({<DATE1={"=aggr(max({<DATE1={"=Date(Max({<DATA_TYPE={"DataType1"}>} DATE1))"}>} DATE1),YEAR)"}>}DATE1)

I need this to get the maximum date of a certain data type for a given year.

My problem is I have "" inside another set of "" and it messes the expression.

Is there any escape character to do this?

Best regards.

4 Replies
nstefaniuk
Creator III
Creator III

Can you use variables as workaround ?

swuehl
MVP
MVP

I am little confused by your second search expression, shouldn't something like

=count({<DATA_TYPE={DataType1}, DATE1={"=aggr(max({<DATA_TYPE={DataType1}>} DATE1) ,YEAR)"}>} DATE1)

not be enough?

Not applicable
Author

No...

nstefaniuk
Creator III
Creator III

I don't know if the No is for me or swuehl.

Try this:

create a variable vDataType1Date:

=Date(Max({<DATA_TYPE={"DataType1"}>} DATE1))

Then a variable vYearDateMax:

=aggr(max({<DATE1={"$(vDataType1Date)"}>} DATE1),YEAR)

and here is your expression:

=count({<DATE1={"$(vYearDateMax)"}>}DATE1)

Just do it by step to take care of date format.