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

Announcements
Qlik GA: Multivariate Time Series in Qlik Predict: Get Details
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Current Week Selection

Hi,

Below is my expression for current week data.

If((LeaveStatus='Absent' or LeaveStatus='Present'),

Num(Count(Distinct {<AttendanceWeek = {$(vCurrentWeek)}>} EmpBasicInfoID),'###')

)

But if i select any other week its not showing data. I need to show current week by default and on selection it should show respective weeks data.

Regards,

Keerthi KS

1 Solution

Accepted Solutions
PrashantSangle

Hi,

If you are using week(today()) then replace it with week(max(datefield))

Regards

Great dreamer's dreams never fulfilled, they are always transcended.
Please appreciate our Qlik community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂

View solution in original post

9 Replies
PrashantSangle

Hi,

Can you share vCurrentWeek expression????

Regards

Great dreamer's dreams never fulfilled, they are always transcended.
Please appreciate our Qlik community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂
PrashantSangle

Hi,

If you are using week(today()) then replace it with week(max(datefield))

Regards

Great dreamer's dreams never fulfilled, they are always transcended.
Please appreciate our Qlik community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂
Not applicable
Author

using week(today())

Not applicable
Author

For Month Should i use Month(max(datefield)) ?

PrashantSangle

Yes

Great dreamer's dreams never fulfilled, they are always transcended.
Please appreciate our Qlik community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂
Not applicable
Author

How about for Average time function.

My expression is Interval(Avg(OutTime-InTime),'hh:mm')

It should show current week by default. and on selection it should show for other week

PrashantSangle

Hi,

did not get it can you explain little bit more???

Avg(OutTime - InTime)      ----- Give you average time between OutTime and InTime.

Regards

Great dreamer's dreams never fulfilled, they are always transcended.
Please appreciate our Qlik community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂
Not applicable
Author

It gives average time between

If i select week then it will take average of that week.

if i take month it shows average of that month.

By default it should show average of current week.

PrashantSangle

Hi,

set analysis inside AVG()

like

avg({<week={"=$(=week(max(datefield)))"}>} OutTime-InTime)

Regards

Great dreamer's dreams never fulfilled, they are always transcended.
Please appreciate our Qlik community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂