Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik GA: Multivariate Time Series in Qlik Predict: Get Details
cancel
Showing results for 
Search instead for 
Did you mean: 
snyt
Contributor
Contributor

Get Min price after the Max price in Set Analysis

Hi All,

I have stocks data and I am trying to find the date of Max Price and use that date in another expression.

This expression gives me the Max Price which is correct:

MAX(TOTAL<Symbol>{$<Date_Num={">=$(=((vMaxDate)+vChartMinDate))<$(=(vMaxDate))"}>}[Price])

The vChartMinDate variable is a slider variable where a user can chose how many days to go back. So if the max date is today then user can go -14 days behind.

Now I want to find the Min Price after this Max Price. So the first step would be to get the date of when this Max Price occured and use that and below is the expression which works fine when a single symbol is selected. But if nothing is selected then it shows Minimum of all time. I have tried AGGR in all different places but doesnt seem to be working.

Min(TOTAL<Symbol>{$<Date_Num={">=$(=$(=MAX({$<Price={"$(=MAX(TOTAL<Symbol>{$<Date_Num={">=$(=((vMaxDate)+vChartMinDate))<$(=(vMaxDate))"}>}Price))"}>}Date_Num)))"}>}[Price])

One thing that i notice is - this part of the expression gets evaluated on the whole data set rather than row level of Symbol. Although i put this in AGGR it doesnt work as expected.

"$(=MAX(TOTAL<Symbol>{$<Date_Num={">=$(=((vMaxDate)+vChartMinDate))<$(=(vMaxDate))"

Can someone help?

 

Labels (3)
0 Replies