Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Announcements
QlikWorld 2020: Join us May 11 - 14, 2020 in Phoenix, AZ. Register early and save $400. Learn More
Not applicable

Variable lookup

I want to find the value of a field in a table based on the value of today also in the same table.

Table (PeriodCalendar) has these fields:

          Date          FinPer

          15/04/15     01

          16/01/15     01

          04/02/15     02

          etc....

So I need a variable that defines the FinPer for today

e.g. if today is 04/02/15 I want my variable to be 02

Thanks for your help

1 Solution

Accepted Solutions
Highlighted
gautik92
Valued Contributor III

Re: Variable lookup

Have a look at this

View solution in original post

2 Replies
Highlighted
gautik92
Valued Contributor III

Re: Variable lookup

Have a look at this

View solution in original post

MVP
MVP

Re: Variable lookup

Define your variable as below

=FirstSortedValue(FinPer,-Date(Date#(Date,'DD/MM/YY')))

or

=FirstSortedValue(FinPer, -IF(Date(Date#(Date,'DD/MM/YY'))=Date(Today()),Date(Date#(Date,'DD/MM/YY'))))