4 Replies Latest reply: Oct 15, 2015 1:38 AM by Markus Haindl

# How to use greater than with variables and two (or more) modifiers?

Hello,

I have a varialbe vSelectedDate, with the numeric equivalent of the 15.05.2014 (41773).

I have this input:

DATE_FROMDATE_TOVALUE
01.01.200031.12.20104.2
01.01.201130.09.20123.5
01.10.201231.12.20135.1
01.01.201430.09.20147.2
01.10.201431.12.99991.3

I'd like to output the value valid for the date in the vSelectedDate variable. My expression looks like the following:

concat({<[DATE_FROM]={"<=\$(\$(vSelectedDate))"},[DATE_TO]={">=\$(\$(vSelectedDate))"}>}DISTINCT VALUE)

My output should look like this: 7.2 (since the 15.05.2014 is greater than green and lesser than orange)

But my output looks like this: 1.37.25.13.54.2 (So it's the concatination of all values possible)

I looked into following threads, but I can't quite figure out why it won't work.

Using Greater Than in Set Analysis

Set Analysis - Dates greater than a given number of days ago

Set analysis greater than less than

• ###### Re: How to use greater than with variables and two (or more) modifiers?

May be this:

=Concat({<[DATE_FROM]={"<=\$(=Date(\$(vSelectedDate), 'DD.MM.YYYY'))"}, [DATE_TO]={">=\$(=Date(\$(vSelectedDate), 'DD.MM.YYYY'))"}>} DISTINCT VALUE)

Update: Sample attached

• ###### Re: How to use greater than with variables and two (or more) modifiers?

Thank you!

• ###### Re: How to use greater than with variables and two (or more) modifiers?

Try:

concat({<[DATE_FROM]={'<=\$(=vSelectedDate)'},[DATE_TO]={'>=\$(=vSelectedDate)'}>}DISTINCT VALUE)

if date format needed, then:

concat({<[DATE_FROM]={'<=\$(=date(vSelectedDate'DD.MM.YYYY'))'},[DATE_TO]={'>=\$(=date(vSelectedDate'DD.MM.YYYY'))'}>}DISTINCT VALUE)

• ###### Re: How to use greater than with variables and two (or more) modifiers?

Thank you very much!