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: 
qliktoview123
Contributor II
Contributor II

Need help to calculate the headcount

Hello,

I am calculating the headcount on the basis of effective date and empl status(= A).I have created Year and month using the effective date.when I am selecting the current year the headcount is around 3191,thats fine but as soon as I select the previous year its giving around 25947. The previous year count is coming wrong, it has to be 3461.

Please help me out .

I have shared the screenshot also.

screenshot2.pngscreenshot.png

11 Replies
qliktoview123
Contributor II
Contributor II
Author

I have directly fetched the data from the erp without implementing any logic. I need to implement above logic in the qlikview and I am not able to apply that logic.

Colin-Albert

Your headcount_test.qvw is loading data from a QVD not directly from your erp system.

This is the load script from the test app you posted

Headcount:

LOAD EMPLID    as EMPID,
     EMPL_RCD,
     Date(EFFDT,'DD/MM/YYYY')  as Date,
     EFFDT,
     YearName(EFFDT,0,4)      as F_Year,
     Month(EFFDT)             as Month,
     EFFSEQ,
     EMPL_STATUS
FROM
[..\..\Qvd\Headcount.qvd]
(qvd) where EFFDT >='42095' ;

Is this SAP data loaded using the SAP Connector to generate the Headcount.QVD file?

Otherwise can you open the headcount.qvd file with a text editor and look at the  <CreatorDoc> tag to see which app created the QVD.