Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Getting the Min & Max values for the selected period

Hi,

For my analysis I need to select a particular period in days and need to get the corresponding values of the Prices for the selected period.

For example:

DayPrice
11000
21008
31008
41017
51025
61028
71037
81037
91042
101046
111051
121057
131058
141064
151070
161077
171078
181082
191092
201101
211109
221109
231118
241129
251137
261145
271155
281160
291170
301178

Lets say I select the preiod starting from Day 20 - Day 30 - I need a formula to get 1101 (the price on day 20) and 1178 (the price on day 30. The price needs to change as and when the selection is made

Please help

13 Replies
Not applicable
Author

Hi,

SInce you have a older version of Qlikview. It doesnt support setanalysis deature.

Have a look at the attached application with simple if statement .

Hope this will help you.

- Sridhar

Not applicable
Author

Hi,

I am really grateful for you to take time out for solving my query.

What does VMin & VMax stand for in the example and would the example work if the price on the last selected day is lesser then the price of the first selected day?

thanks

Not applicable
Author

Hi,

VMax and V Min are two variables to store the the Maximum and Minimum values of the selection.

VMax =Max(Day)

VMin =Min(Day)


If you select Day 20 to Day 30, VMAx and VMin will have the below values.

VMax = 30

VMin = 20

And i`m using this variable in if statement to restrict values.

"example work if the price on the last selected day is lesser then the price of the first selected day?"

Example will work in all cases, since i have not checked those conditions.

-Sridhar

Not applicable
Author

Thanks a lot finally can finish my assignment