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: 
Not applicable

Need help

Hi all,

i need help i my qv aplications:

i have one table with 3 fileds: VisitorID, Visits.ComeIn, VisitsCome.Out

in last to fields contains time data. I need calculate visitors in some periods,

1. period  09:00-11:00

2.period 11:00-16:00

3.period 16:00 - 22:00

please help and sory for bad english, i hout you understand what i want...

11 Replies
Not applicable
Author

Hi,

transform VisitComeIn e VisitcomeOut fields in Timestamp before And in number then:

1 Period=  count(Distinct {<VisitComeIn={">=x"}, VisitComeOut={"<=y"}>}      VisitID)

2 Period...

where x= num(VisitComeIn) and y=num(VisitComeOut)

Not applicable
Author

could you please explain how to convert data...

Not applicable
Author

x=num(Timestamp('09:00','hh:mm'))

y=num(Timestamp('11:00','hh:mm'))

z=num(Timestamp('16:00','hh:mm'))

...

Not applicable
Author

ok, my expresion is: =count(DISTINCT{<Visits.ComeIn={">=num(Timestamp('09:00','hh:mm'))"}, Visits.ComeOut={"<=num(Timestamp('11:00','hh:mm'))"}>} VisitID)

but it returns 0..whats wrong?

tresesco
MVP
MVP

The fastest way to get your issue resolved for such issues is to post a sample app you are trying with. Mean while try:

=count(DISTINCT{<Visits.ComeIn={">=Timestamp('09:00','hh:mm')"}, Visits.ComeOut={"<=Timestamp('11:00','hh:mm')"}>} VisitID)             //i.e without num

Not applicable
Author

No,

create 4 variables like these:

x=num(Timestamp('09:00','hh:mm'))

y=num(Timestamp('11:00','hh:mm'))

z=num(Timestamp('16:00','hh:mm'))

k=num(Timestamp('22:00','hh:mm'))

and then use this expression:

=count(DISTINCT{<Visits.ComeIn={">=$(x)"}, Visits.ComeOut={"<=$(y)"}>} VisitID)

...

Not applicable
Author

still not working.., attched to my post a sample

Not applicable
Author

Attach your qvw please

Not applicable
Author

already atached (to my first post, visits.qvw)