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

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
DipeshVadgama
Partner - Creator II
Partner - Creator II

Count of Task for Previous workday date

Hi,

I am trying to calculate count of task for previous workday data. I have my data in below format

   

StartedTask
25569.0416712
42853.4841613
42853.4841919
42857.8886810
42857.8890915
42857.8970715
42857.8970811
42857.8971911

I am trying to apply

Count({$<Started={"$(=Date(only(Started)-1))"}>}Task but no result

I did try to convert Started to Date(Started) in load but no use.

1 Solution

Accepted Solutions
DipeshVadgama
Partner - Creator II
Partner - Creator II
Author

Thanks all,

I have applied below syntax and its works perfect

=Count({$<Started={'=Num(Floor(Started))= Num(firstworkdate(Today()-1, 1))'}>}Task)

View solution in original post

7 Replies
Anil_Babu_Samineni

You may need to understand the Only() function and how this works.

Only - chart function ‒ QlikView

https://community.qlik.com/docs/DOC-8146

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
Ralf_Heukäufer
Partner - Creator III
Partner - Creator III

Hello Dipesh,

for the count you can try

=aggr(count(Task),Started)

But what is the format of the started date?

If it is a timestamp you must use the timestamp() funktion instead of date:

In the case that are two dates seperatet by a point you must build a substring.

sunny_talwar

May be this

Count({$<Started={"=Floor(Started) = (Max(TOTAL Floor(Started))-1)"}>}Task)

vishsaggi
Champion III
Champion III

Why we need Total in the Max() Sunny?

sunny_talwar

Because Max(Floor(Started)) = Floor(Started) when Started is the dimension.... to get the Max across all Started... we need TOTAL

vishsaggi
Champion III
Champion III

Got it. Cool.

DipeshVadgama
Partner - Creator II
Partner - Creator II
Author

Thanks all,

I have applied below syntax and its works perfect

=Count({$<Started={'=Num(Floor(Started))= Num(firstworkdate(Today()-1, 1))'}>}Task)