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: 
krishna20
Specialist II
Specialist II

Employee Count

Hi Folks,

I'm having a Employee_Leave table consists of LEAVE_START_DATE and LEAVE_END DATE. I need to show the employee's leave count and remaining leaves. How can we show it in the dashboard? I'm planning to show with arbitrary date ranges.i.e., when the start date selected the employees on leave will be shown.

But having a doubt to implement this scenario. In the arbitrary date range only one date will be used as LEAVE_START_DATE and end date. Where i need to consider the LEAVE_END_DATE??How the two dates will be combined as one? and How can i show this scenario clearly to understand.Please anyone suggest me.Kindly find the sample app.

15 Replies
avinashelite

just add one more column in the calendar as below, rest of the code look correct

TempDate AS Date_Key,


note : keep the date formats same i.e calendar and start and end date format same

like date(START_DATE,'DD-MM-YYYY') as Date_Key

date(TempDate ,'DD-MM-YYYY') as Date_Key

date(END_DATE,'DD-MM-YYYY') as Date_Key

krishna20
Specialist II
Specialist II
Author

Hi ,

Greetings Avinash,

In the Temp Table which Date i need to take here. Whether DATE_START or DATE_END?? or i need to Take Date_Key here???Please suggest me..

Calendar:

QuartersMap:

MAPPING LOAD 

rowno() as Month,

'Q' & Ceil (rowno()/3) as Quarter

AUTOGENERATE (12);

Temp:

Load

               min(DATE_START) as minDate,

               max(DATE_START) as maxDate

Resident PER_ABSENCE_ATTENDANCES;

Let varMinDate = Num(Peek('minDate', 0, 'Temp'));

Let varMaxDate = Num(Peek('maxDate', 0, 'Temp'));

DROP Table Temp;

TempCalendar:

LOAD

               $(varMinDate) + Iterno()-1 As Num,

               Date($(varMinDate) + IterNo() - 1) as TempDate

               AutoGenerate 1 While $(varMinDate) + IterNo() -1 <= $(varMaxDate);

avinashelite

no , design the calendar according to your need, something like 1990 to 2030

if you what to make the calendar according to the data i.e START or END Date then you need to do a group by and fetch the max from end date and min from start date

krishna20
Specialist II
Specialist II
Author

Hi Avinash,

I'm very new to Link table concept.I need to show the data according to Start_Date and End_Date. Can you please edit in the sample file and suggest me. It helps me to learn this concept as well as not to miss anything in the script further.

Anonymous
Not applicable

Hello Qlik Community Members,

We got a flag that were was personally identifiable information in this thread. I've just removed the attachments as it looks like you have found a solution. IF you still need to re-upload an example please be Extra Careful that it has been cleansed of any personal or confidential information.

Also- Mr. Krishna please take a moment to mark helpful and correct responses where applicable.

Best Regards, Sara

krishna20
Specialist II
Specialist II
Author

Hi Sara,

I have already marked this thread as Helpful.

Regards

Krishna