Qlik Community

Qlik DataMarket Discussions

Discussion Board for collaboration regarding Qlik DataMarket.

nehapathak
New Contributor II

How to calculate the sum of days as per the status for 6 months

I have data of 6 months i.e Feb to July separately in 6 separate excel sheets and each sheets have column "Empid"(Primary key) , "Status" and "days".

Status of employee are "Posted" , "FP" and "TM" and this status may change every month for a corresponding Empid

Now I have to make 3 columns in load editor as "Total Posted" "Total FP" and "Total TM" which should add the sum of the days as per the "Status" of the Empid.

eg: Here the Empid is xyz

"month"     "Status"       "Days"

Feb          Posted           20

March        FP                22

April          Posted          10

May           TM               30

June         FP                 40

July           TM                15

now the answer should be:

Total posted=30

Total FP=62

Total TM=45.

In this I am not able to find the sum as per the categorization

Kindly help me out in making a column in load editor in qliksense .

3 Replies

Re: How to calculate the sum of days as per the status for 6 months

check here:

The Generic Load

nehapathak
New Contributor II

Re: How to calculate the sum of days as per the status for 6 months

I want to obtain selective sum in a column according to categorization. For example if status is posted the sum of days should only be only of the posted category for all the months.

Applying or, and operators does not solve the problem as either it considers all the condition or only 1.

The logic i used is as follows:

If ('july_status='POSTED' or june_status='POSTED' or may_status='POSTED' or april_status='POSTED' or march_status='POSTED' or feb_status='POSTED' ,

july_days'+june_days' +may_days+ april_days + march_days+ feb_days) as "Total Posted",

The link you shared is not solving our problem.

YoussefBelloum
Esteemed Contributor

Re: How to calculate the sum of days as per the status for 6 months

Hi Neha,

You try a Group by to calculate the sum on the load.

Regards

Community Browser