Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Variable Value in Set analysis - Date Range

I know there are many examples of this on the forums, but can't get it to work in my enviroment

Simple, trying to sum Dollars based on input box variables...the field is Month|Year

vTY_Start and vTY_End

A sample value here is 01-2013

This is what i'm trying, but doesnt seem to work.

Sum({<Month|Year={'>=$(vTY_Start)<=$(vTY_End)'}>} Dollars)

Thank you in advance!

-David

1 Reply
Gysbert_Wassenaar

Some possible problems:

01-2013 could be evaluated as 1 - 2013 = -2012

Month|Year contains text values and comparing text values using >= and <= won't work

Month|Year is a date field formatted as MM-YYYY, but the variables vTY_Start and vTY_End are string values. You'll need to use the date# function to make dates from them: date#(vTY_Start,'MM-YYYY')



talk is cheap, supply exceeds demand