Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Get Field Selection - less than

Hello,

I have the following set analysis, which is showing me inventory for the date i have selected.

How can i modify it to show me the inventory for all dates less than or equal to my selection?

Sum({$<calendar_date={'$(=GetFieldSelections(calendar_date))'}>} on_hand_qty))

3 Replies
rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

Sum({$<calendar_date={'<=$(=only(calendar_date))'}>} on_hand_qty))

-Rob

jonathandienst
Partner - Champion III
Partner - Champion III

Hi

Try this:

Sum({$<calendar_date={"<=$(=GetFieldSelections(calendar_date))"}>} on_hand_qty)

(note the double quotes) But this will fail if you have more than one calendar date selected. You can also try:

Sum({$<calendar_date={"<=$(=Date(Max(calendar_date)))"}>} on_hand_qty)

(assuming calendar_date is in the default date format for you model - otherwise modify the Date() statement)

Hope that helps

Jonathan

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
sivasiri99
Contributor III
Contributor III

Hi Jonathan

i would like to have only current selected date and (+5 day and +10 day and +15 day)

example if i had selected :30 dec 2016 in list box  in chart i should have 3 Jan 2017 and 8 Jan 2017 and 13 Jan 2017 .

Could you help me out.

sivaram