Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
limfungkeat
Contributor III
Contributor III

Set Analysis with variable and date period greater than less than

Dear Masters out there ! 

I have 2 variables v_DateFrom and v_DateTo, chosen/assigned from Calendar object . Then i need to count total man hrs worked for a list of employee within that date range . The below is not working in my expression . Please assist 

 

Sum({<[EMP_NM]= {'ABC','XYZ'},APPROVEDDATE = {">=$(=Date(v_DateFrom))<=$(=(v_DateTo))"}>}MANHRS)

 

Thanks !

Lim

 

Labels (3)
24 Replies
Shubham_Deshmukh
Specialist
Specialist

Wlcm 🙂
limfungkeat
Contributor III
Contributor III
Author

Dear Shubham

There is another problem here , where in my straight table , the below script is working fine , but it won't show the duplicate records in the table , where there is this record , where the prod_nm, act_date, man_hrs etc ..are the same 

and it only shows one ...How to make all the records to display ? 

 

NPDScript:

select FORM_ID,EMP_NO,EMP_NM, PROD_NM,SITE,ACTIVITIES,ACT_DATE,MANHRS,TIMESHEET_DATE,APPROVEDDATE,TOTAL_COST,PHASE FROM timesheet_npd order by approveddate ;
NoConcatenate
Load FORM_ID,EMP_NO,EMP_NM as emplyeenames,PROD_NM,SITE,ACTIVITIES, ACT_DATE,MANHRS as manhrs_npd,TIMESHEET_DATE, floor(APPROVEDDATE) as appDates,TOTAL_COST,PHASE
Resident NPDScript;
Drop table NPDScript ;

 

Shubham_Deshmukh
Specialist
Specialist

Hey @limfungkeat ,

Hope your are doing great!!

Obviously it will show one record of each employee as our requirement was Sum(MAN_HRS) of each employee, EMP_NM was our dimension right.

- Shubham 

limfungkeat
Contributor III
Contributor III
Author

Opps..so sorry Shubham, you are right ! I was confused and asked another question which is not related to this thread ... hahahah

Shubham_Deshmukh
Specialist
Specialist

Cat Tongue