Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

kungfukittens
New Contributor

variables in an expression

Can someone help me?

Im still new using qlik sense. I have a problem using variables / functions inside an expression. Whats wrong with this.

I have a variable  vHour

HOUR(TIMESTAMP(NOW()))

running this return 0 value (current time im running this is at 12:50)

=Count({<DepartureTimeScheduleAddedHour={"<=$(=vHour)"}>}DepartureTimeScheduleAddedHour)

running this returns a value of 18

=Count({<DepartureTimeScheduleAddedHour={"12"}>}DepartureTimeScheduleAddedHour)

Can you guide me as to what im doing wrong

Thanks

1 Solution

Accepted Solutions
ychaitanya
Contributor III

Re: variables in an expression

Hey Can you try this

=Count({<DepartureTimeScheduleAddedHour={"<=$(vHour)"}>}DepartureTimeScheduleAddedHour).


also.. you can try


=Count({<DepartureTimeScheduleAddedHour={"=$(HOUR(TIMESTAMP(NOW())))"}>}DepartureTimeScheduleAddedHour)

5 Replies
Digvijay_Singh
Honored Contributor III

Re: variables in an expression

May be this -

=Count({<DepartureTimeScheduleAddedHour={"<=$(vHour)"}>}DepartureTimeScheduleAddedHour)

ychaitanya
Contributor III

Re: variables in an expression

Hey Can you try this

=Count({<DepartureTimeScheduleAddedHour={"<=$(vHour)"}>}DepartureTimeScheduleAddedHour).


also.. you can try


=Count({<DepartureTimeScheduleAddedHour={"=$(HOUR(TIMESTAMP(NOW())))"}>}DepartureTimeScheduleAddedHour)

sasiparupudi1
Honored Contributor III

Re: variables in an expression

What are the expected value ?

is your dimension DepartureTimeScheduleAddedHour having values as integers representing hours?

kungfukittens
New Contributor

Re: variables in an expression

thanks..

kungfukittens
New Contributor

Re: variables in an expression

thanks

Community Browser