Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

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
Creator III
Creator III

Hey Can you try this

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


also.. you can try


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

View solution in original post

5 Replies
Digvijay_Singh

May be this -

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

ychaitanya
Creator III
Creator III

Hey Can you try this

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


also.. you can try


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

sasiparupudi1
Master III
Master III

What are the expected value ?

is your dimension DepartureTimeScheduleAddedHour having values as integers representing hours?

Anonymous
Not applicable
Author

thanks..

Anonymous
Not applicable
Author

thanks