Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
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.