Skip to main content
Announcements
Introducing a new Enhanced File Management feature in Qlik Cloud! GET THE DETAILS!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

date-variables in set analysis


Hi there,

I Need to set the current date in the string, but it doesn´t work.

I have a field, named MeassureDate. There are values like '12.01.2014', '13.01.2014', '14.01.2014' and so on.

Temperature contains weathervalues: 5,2,3,4,7,8 and so on. (Values in °C). Hundreds of values a day.
In Script I set the variable vActDate to Today()

now I made a set Analysis-formula:

Max( {1<MeassureDate = {$(#vActDate)}> Temperature)

A TextBox Returns me 14.01.2014 for vActDate, bit the Set Analysis won´´t work. I get only a '-'.

Does anybody know, how to bind the variables functionaly in the Set Analysis-String?

Thanks a lot for your Help!

Marcel

28 Replies
Not applicable
Author

I had already.

2014-01-14_13h59_28.png


brijesh1991
Partner - Specialist
Partner - Specialist

vActDate=Date(Today(),'DD.MM.YYYY')

we have set DD.MM.YYYY for today date, so the same should be for your MeassureDate or vice versa.

Max({$<MeassureDate = {'$(vActDate)}'> Temperature)

Not applicable
Author

Hi,

it doesn´t work.

Example attached.

kiranmanoharrode
Creator III
Creator III

Dear Marcel,

          Please add '=' sign before your expression. It will definately work.......:)

Regards,

Kiran Rode

+91 8976977897

kiranmanoharrode
Creator III
Creator III

Dear Marcel,

     Use below Expression.

=Max({<MeassureDate={"$(vActDate)"}>}Temperature)

Regards,

Kiran Rode

+91 8976977897

Not applicable
Author

Sorry, I get the value 0. It must be 7.

2014-01-14_14h38_15.png

atafsson
Creator
Creator

Textbox:

=max({1<MeassureDate ={'$(vActDate)'}>} Temperature)

Regards

Axel

Not applicable
Author

  Hi Marcel,

Try the below expression.

The diference here compared to my earlier expression is with the quotes applied on the variable.

Hope it works for you !

=sum({$<MeassureDate ={'$(vActDate)'}>} Temperature)

Thanks

kiranmanoharrode
Creator III
Creator III

Dear Marcel,

PFA for a solution

Regards

Kiran Rode

+91 8976977897

nizamsha
Specialist II
Specialist II

=Max({$<Date={'$(vActDate)'}>}Temperature)