Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements

Breathe easy -- you now have more time to plan your next steps with Qlik!
QlikView 11.2 Extended Support is now valid through December 31, 2020. Click here for more information.

Not applicable

How to maximum/minimum value from the current selection date to previous 52 weeks

Hi,

when I select a date/month column, I need a text box which displays the maximum price from the selected date until previous 52 weeks(1 year) .

Similarly I need the minimum price from the selected date to last 52 weeks .

How do I achieve this?

1 Solution

Accepted Solutions
Not applicable

Re: How to maximum/minimum value from the current selection date to previous 52 weeks

Thanks Pradeep and Ravi.

I was able to correct the expression ,below is the correct expression:

=max({<Date={">=$(=Date($(vStart)))<=$(=DT_KEY($(vEnd)))"}>}price)

5 Replies
laxmikuber
Contributor II

Re: How to maximum/minimum value from the current selection date to previous 52 weeks

Hi Rekha,

Can you explain more about your problem?

And it will be good if you can share sample data.

Thanks,

Laxmi

ravic906
Contributor III

Re: How to maximum/minimum value from the current selection date to previous 52 weeks

Hola,

let vEnd=today();

let vStart=today()-365;

expression 1 is max(Date={">=$(=Date(vStart))<=$(=Date(vEnd))"}>}price)

expression 2 is min(same as above)


HTH

Not applicable

Re: How to maximum/minimum value from the current selection date to previous 52 weeks

Hi Ravi,

am getting an error for the set analysis expression.could you help me out

pradeepreddy
Valued Contributor II

Re: How to maximum/minimum value from the current selection date to previous 52 weeks

use the '$' symbol before the variable..

max(Date={">=$(=Date($(vStart)))<=$(=Date($(vEnd)))"}>}price)

Not applicable

Re: How to maximum/minimum value from the current selection date to previous 52 weeks

Thanks Pradeep and Ravi.

I was able to correct the expression ,below is the correct expression:

=max({<Date={">=$(=Date($(vStart)))<=$(=DT_KEY($(vEnd)))"}>}price)