Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Posting on Qlik Community is temporarily paused for some users. Thank you for patience and we'll update you soon!
cancel
Showing results for 
Search instead for 
Did you mean: 
nicki1926
Contributor
Contributor

count previous week

hi

There 2 count numbers i would like to represent:

1) number of faults which happen today until a cretin hour.

2) number of faults which happen on the same day and hour a week before.

I'm having an issue with the 2nd count.

following my example:

lets say that now its 22/11/2016 10:00AM and i've create a count of faults starting from the begining of today untill now 10AM - alreay made this part

the problem start when i want to create a count of the 15/11/16 from begining of that day(15/11/16) untill 10AM.

here is the code i wrote:

variable:

$(v_seven_days) = date(MIN(fault_date) -7)

$(v_seven_days_hour)= hour(date(MIN(fault_date)-7 , 'dd/MM/yyyy hh:mm:ss') )

=count({<fault_date= {'$(=$(v_seven_days))'}, hour_falut= {'>=$(v_seven_days_hour) = hour(now()) '}>} fault_number)

but it's not working

Labels (1)
0 Replies