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: 
jorditorras
Creator
Creator

Firt value of a selected range of date

Dear Gurus,

I have a table like:

Date-TimeR Factor
4 October 18:38:0120
4 October 18:37:0112
4 October 18:36:0145
4 October 18:35:0152
4 October 18:34:0121
4 October 18:33:0134
4 October 18:32:0153
4 October 18:31:0135
4 October 18:30:0145
4 October 18:29:0133
4 October 18:28:0125
4 October 18:27:0137

where Date-time is the Range of Date that I have selected. I would like have a KPI that shows the first value of the selected range of Date. That woud be:

R Factor = 37

How can I reach it?

Thanks in advance!!

Regards,

Jordi

1 Solution

Accepted Solutions
Chanty4u
MVP
MVP

try

=firstsortedvalue(Rfactor,-DateTime)

or

=firstsortedvalue(Rfactor,DateTime)

Edited: FirstSortedValue - script function ‒ QlikView

View solution in original post

5 Replies
Anonymous
Not applicable

which object you want to use?

to get the value I would use this expression

only({<[Date-Time]={'$(=min([Date-Time])'}>}[R Factor])

Chanty4u
MVP
MVP

try

=firstsortedvalue(Rfactor,-DateTime)

or

=firstsortedvalue(Rfactor,DateTime)

Edited: FirstSortedValue - script function ‒ QlikView

tresesco
MVP
MVP

=firstsortedvalue( Rfactor, DateTime)

Chanty4u
MVP
MVP

my bad Thanks for correction

jonathandienst
Partner - Champion III
Partner - Champion III

Do you have separate Date and Time fields? How is the user selecting a "Range of Date"?

It may be a simple as

     =Min([Date-Time])

     and

     =FirstSortedValue([R Factor], [Date-Time])

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein