Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Announcements
Announcing the newest addition to the Qlik Community, Qlik Gallery! Learn More
Highlighted
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
gautik92
Valued Contributor III

Re: Variable lookup

Have a look at this

2 Replies
gautik92
Valued Contributor III

Re: Variable lookup

Have a look at this

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'))))