Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
rittermd
Master
Master

Expression Help

What is wrong with this expression?

Sum({<$(vTTLStartDate)={'4/1/2015'}>}((DCrating - AdmitRating) * NumGoal))

/

Sum({<$(vTTLStartDate)={'4/1/2015'}>} NumGoal)

I have confirmed that the variable does contain 4/1/2015.  The variable was created by taking the Min of a date field.

14 Replies
simondachstr
Luminary Alumni
Luminary Alumni

$(vTTLStartDate) has to be a Field within the set modifier - what expression hides beneath the variable?

rittermd
Master
Master
Author

min(Date(FromDate))

reddy-s
Master II
Master II

Hi Mark,

Try this:

Sum({<$(=vTTLStartDate)={'4/1/2015'}>}((DCrating - AdmitRating) * NumGoal))

/

Sum({<$(=vTTLStartDate)={'4/1/2015'}>} NumGoal)

rittermd
Master
Master
Author

That didn't work. Just get a - in the object

reddy-s
Master II
Master II

may be it could be a conflict with the date formats. Are the formats same?

rittermd
Master
Master
Author

I confirmed that the variable displays 4/1/2015

sunny_talwar

May be this:

Sum({<KeyField ={" =$(vTTLStartDate) = '4/1/2015' "}>}((DCrating - AdmitRating) * NumGoal))

/

Sum({<KeyField ={" =$(vTTLStartDate) = '4/1/2015' "}>}} NumGoal)

simondachstr
Luminary Alumni
Luminary Alumni

reddys310‌ this would not work, you need to have a Field on the left hand of the equation within the set modifier.

sunny_talwar

Actually if the variable is getting evaluated to 4/12015, you might be looking to do this:

Sum({<FromDate={'$(=$(vTTLStartDate))'}>}((DCrating - AdmitRating) * NumGoal))

/

Sum({<FromDate={'$(=$(vTTLStartDate))'}>}} NumGoal)