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

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
Uri
Creator
Creator

max total date with where condition

Hi guys,

I want to create a variable which I will use further in NPrinting "Enable dynamic naming".

max(total date) where company_id = 'XXXXX' and where in myfield = 'XXXXX'.

Can someone help?

BR,

Artur

Labels (1)
1 Solution

Accepted Solutions
GaryGiles
Specialist
Specialist

Just paste the expression into the definition of the variable and then use the $-expansion

 

$(vVariable)

 

Assuming vVariable is the name of your variable.

View solution in original post

3 Replies
GaryGiles
Specialist
Specialist

Have you tried using set analysis?

max({$<company_id={'XXXXX'},myfield={'XXXXX'}>} total date)

Uri
Creator
Creator
Author

Cool! It works.

Thanks!

How can I convert this to a variable?

GaryGiles
Specialist
Specialist

Just paste the expression into the definition of the variable and then use the $-expansion

 

$(vVariable)

 

Assuming vVariable is the name of your variable.