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

Announcements
See why IDC MarketScape names Qlik a 2025 Leader! Read more
cancel
Showing results for 
Search instead for 
Did you mean: 
Dayna
Creator II
Creator II

Set Analysis and Selecting Max Date

Hello!

I was hoping that you could help me - I am trying to write a line of script for the use within a chart, which currently uses set analysis to show the results for the last and next 13 weeks. What I am now trying to achieve, is by expanding on the originally script, show the minimum value on the max day within the week. I.e.

Week No. Date. Closing Balance

1 01/02/2010 100

1 04/02/2010 600

1 06/02/2010 300

1 06/02/2010 500

1 06/02/2010 400

2 10/02/2010 1000

2 10/02/2010 200

Using the above example, for week 1, I would want the chart to take the value 300, as this is the minimum value on the last day of the week available.

My original script for the 13 weeks is:

Min({<[BOM Chart - Date] = {"<=$(=date(only(today())+91))>=$(=date(only(today())-91))"}>} [BOM Chart - Balance])

And my attempt to achieve the above was:

max(aggr([BOM Chart - Date]),(Minstring({<[BOM Chart - Date] = {"<=$(=date(only(today())+91))>=$(=date(only(today())-91))"}>} [BOM Chart - Balance])))

If you could help with the above, it would be most appreciated!! As I am really starting to struggle.

Kind Regards,

Dayna

0 Replies