Skip to main content
Announcements
NEW: Seamless Public Data Sharing with Qlik's New Anonymous Access Capability: TELL ME MORE!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

set Analysis

Hi everyone,

               I have to display data on hourly basis .Ihave taken hours as dimension and Expression is

=if(day=day(today()),count(number)) it is not working

if day is today then i should  count Ticket number and show the data.Please help me

Regards,

Divya

1 Solution

Accepted Solutions
jagan
Luminary Alumni
Luminary Alumni

Hi,

In your script replace this

Timestamp(opened_at,'hh') as Hours with Hour(opened_at) as Hours

and in your variable set Vtoday =today() and use this expression in chart

=count({<date={'$(Vtoday)'}>}number)

Regards,

Jagan.

View solution in original post

18 Replies
Not applicable
Author

Take today() in variable and try..

= if(1/6/2014=$(vToday),1)

vToday is Today()

And also check the date format....

Selva...

simondachstr
Luminary Alumni
Luminary Alumni


Day() formats to numbers 1-7. Maybe your day field though are characters 'Mo', 'Tue' etc.?

A small but very common error.

preminqlik
Specialist II
Specialist II

hi try this

count(if(Date=date(today()),Number))

hope this helps you

preminqlik
Specialist II
Specialist II

or count({{<Date={'$(=date(today()))'}>}Number)

Not applicable
Author

Hi,

  Days field contains 1 to  31 numbers only not in text format

adnan_rafiq
Partner - Creator II
Partner - Creator II

if you use Date(Today) it will return value like 1/6/2013 which will be re evaluated to 1 divided by 6 divided by 2013 due to $ expansion (you can say it a bug). Use num(Today() and make sure in script you load DateField as number

by using num(DateField) as DateField

Anonymous
Not applicable
Author

Create the numeric value of your date field in script to ignore any format issues.

via, num(Date_field) as Date_field_num.

Now use this field in expression in set analysis

count({$<Date_field_num={$(=num(today()))}>}Number)

Hope it solves the problem...

Regards

Nitin

jagan
Luminary Alumni
Luminary Alumni

Hi,

Can you attach some sample file.

Regards,

Jagan.

Not applicable
Author

Hi,

   PFA

Regards

Divya