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

Announcements
Posting on Qlik Community is temporarily paused for some users. Thank you for patience and we'll update you soon!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Data selection based on another selection

Hi All,

Based on the data below, I am trying to achieve as a chart expression the following...

Sum of stock for the minimum week number in 2016 i.e. 40 (from week 11)

& am trying things like this...

=SUM (if(Year=2016 and Week= (Min(if(Year=2016,Week))) ,Stock))

or

=SUM ({$<Week = {$(min(total Week))} ,Year ={2016}>}  Stock)

but it is not happy with any of these logics... any ideas please ?

Thanks in advance

Bob

YearWeekStock
2015310
2015420
2015530
20161140
20161250
Labels (1)
1 Solution

Accepted Solutions
sunny_talwar
MVP
MVP

May be try this:

Sum({<Week = {"$(=Min({<Year = {$(=Max(Year))}>}Week))"}>}Stock)


Capture.PNG

View solution in original post

2 Replies
sunny_talwar
MVP
MVP

May be try this:

Sum({<Week = {"$(=Min({<Year = {$(=Max(Year))}>}Week))"}>}Stock)


Capture.PNG

Not applicable
Author

Thank you so much - works perfectly !!!!!!!!!!!!!!!!!!!!