4 Replies Latest reply: Nov 16, 2011 3:05 PM by mferrentino RSS

    Set Analysis - Set Modifier with Variable and Less Than or Equal too

      I am trying to create a chart using set analysis that will show all years up to what the user has selected.  I have a "Year" selection box set to "must have one value selected" with values from 2008-2011.  If the user selects 2010, the chart needs to show 2008-2010.  If the user selects 2011, looking for chart to show 2008-2011.  Attempting to use set analysis with less than or equal.  I have tried putting the less than or equal to on the Year field itself or with a variable that returns the value of the year currently selected.  Neither case works.  However, if I hard code in a year, the less than or equal to will work.  Ex.


      = sum ( { 1 < Year = { "<= 2010"}>} Balance) works fine, and no matter what value is selected in the Year field, my chart is correctly showing the sum for years 2008, 2009, and 2010.  However, when I attempt to use either the Year field itself, or a variable returning the value of the field, as shown below, I get "No Data to display"


      = sum ( { 1 < Year = { "<=Year"}>} Balance) does not work, returns no data to display, also:

      = sum ( { 1 < Year = { "$(<=$(YearSelected))"} > } Balance) returns no data to display.


      YET, if I remove the less than symbol from the code with the variable name, and just keep the = sign, the chart will display the single data point for the year selected


      = sum ( { 1 < Year = {"$(=$(YearSelected))"} > } Balance) returns the single data point for the currently selected year.


      I'm assuming I must have a syntax error somewhere, but my syntax follows what I've found in other threads.


      Am I just totally missing something???

      Thanks in advance for any help