Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

berryandcherry6
Contributor II

error in expression in qliksense

Hi,

I am getting count of datecreated, where my sql query will be

select count(*) from Datatable where  date_created > '2016-06-17 20:00:00'  and date_created < '2016-06-22 00:00:01';

In my qliksense, i have

Count({$<datecreated > {'2016-06-17 20:00:00'},datecreated < {'2016-06-22 00:00:01'}>}datecreated)

but its giving me expression error.

what i am missing here,Please help me on this.

Regards,

Supriya

Tags (1)
3 Replies
galax_allu
Valued Contributor

Re: error in expression in qliksense

Hi

i think you have missed some aggregate field here  like value or sales ...etc.,

COUNT({<datecreated={'>2016-06-17 20:00:00<2016-06-22 00:00:01'}>} Value)

arulsettu
Honored Contributor III

Re: error in expression in qliksense

maybe try this

Count({$<datecreated = {'>=2016-06-17 20:00:00<=2016-06-22 00:00:01'}>}datecreated)

MVP
MVP

Re: error in expression in qliksense

You can also try this:

Count({$<datecreated = {"$(=

'>' & TimeStamp(MakeDate(2016, 6, 17) + MakeTime(20), 'YYYY-MM-DD hh:mm:ss') &

'<' & TimeStamp(MakeDate(2016, 6, 22) + MakeTime(0, 0, 1), 'YYYY-MM-DD hh:mm:ss'))"}>} datecreated)

Community Browser