Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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:
Day | Price |
1 | 1000 |
2 | 1008 |
3 | 1008 |
4 | 1017 |
5 | 1025 |
6 | 1028 |
7 | 1037 |
8 | 1037 |
9 | 1042 |
10 | 1046 |
11 | 1051 |
12 | 1057 |
13 | 1058 |
14 | 1064 |
15 | 1070 |
16 | 1077 |
17 | 1078 |
18 | 1082 |
19 | 1092 |
20 | 1101 |
21 | 1109 |
22 | 1109 |
23 | 1118 |
24 | 1129 |
25 | 1137 |
26 | 1145 |
27 | 1155 |
28 | 1160 |
29 | 1170 |
30 | 1178 |
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
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
Hi
Use something like this
For Start day Price MAX({$<Day={$(=MIN(TOTAL Day))}>} Price)
For End day Price MAX({$<Day={$(=MAX(TOTAL Day))}>} Price)
First MAX function is necessary just for aggregation
Cheers
Darius
Hi,
This doesnt seems to work. Pls help
The attached QV does not work
Anybody can help me out here as Im really stuck [:'(]
Hi Umang,
The above exmaple by Darius does work, Please have a second look.
Regards,
Ankur
May I ask the version of QV you have - as the same is not working at my end
Hi,
Check the attached application. Hope this will help you.
- Sridhar
Thanks Sridhar,
But the code does not seem to work on my qlikview (version 6.8) , maybe i need to update the same and then check
Hello Umang,
Both the applications work on QV 8.5 as well as QV 9.0.
Regards,
Ankur