Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
ilanbaruch
Specialist
Specialist

set analysis with variable

hi all,

i have a variable (vSysHour) with system hour, i want to calculate amount where hour dimension is small or equal to variable value.

tried it like this:

Sum({$<HOUR={"'<='$(vSysHour)"}>}Amount)

it didn't worked..

any ideas?

advanced thanks

1 Solution

Accepted Solutions
Chanty4u
MVP
MVP

try without single quote

Sum({$<HOUR={"<=$(vSysHour)"}>}Amount)

View solution in original post

4 Replies
shraddha_g
Partner - Master III
Partner - Master III

Remove single quotes from expression.

Chanty4u
MVP
MVP

try without single quote

Sum({$<HOUR={"<=$(vSysHour)"}>}Amount)

sunny_talwar

May be like this:

Sum({$<HOUR={"$(='<=' & vSysHour)"}>}Amount)

or

Sum({$<HOUR={"$(='<=' & $(vSysHour))"}>}Amount)

jonathandienst
Partner - Champion III
Partner - Champion III

Is vSysHour a numeric or a string? How is it defined? What do =vSysHour and =$(vSysHour) look like in textboxes?

What is HOUR (hours as a numeric, a string time value, a datetime value of hours)?

The answer will be something like:

Sum({$<HOUR={"<=$(vSysHour)"}>}Amount)

Sum({$<HOUR={"<=$(=vSysHour)"}>}Amount)

Sum({$<HOUR={"<=$(=Time(vSysHour))"}>}Amount)

Sum({$<HOUR={"<=$(=Time(Time#(vSysHour, 'xxx'), 'yyy')"}>}Amount)

(replace xxx with format of vSysHour and yyy with format of HOUR

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