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

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
bushpalaamarnat
Creator
Creator

Calculation of subtraction in qlikview for weekly data

Hi

this is my current script which is working.

ICR_Load:

LOAD

Week,

     text(Material) as Material,

     [Material Description],

     [Material Type],

     Category,

     [Demand Volume (Eaches)],

     DFC,

     Brand,

     [Sub-Brand],

     Variant,

     Lifecycle,

     [Customer Loc],

     [Customer Location Description],

     [Customer Zone],

     [Supplier Loc],

     [Min DFC],

     [Max DFC],

     [Safety Days Supply],

     Week & text(Material) & [Customer Loc] as %Key,

     text(Material) & [Customer Loc] as %MasterKey,

ApplyMap('MAP',[Customer Loc],'Not Franchise') as FranchiseMarket,

     if(DFC = 0 and [Demand Volume (Eaches)] < 0,'OOS',

          if(DFC < [Min SFT Days] and [Demand Volume (Eaches)] > 0, 'Low Stock',

          if(DFC >= [Min SFT Days] and DFC <= [Max SFT Days], 'Intolerance',

          if(DFC > [Max SFT Days], 'Overstock',

          if(DFC = 0 and [Demand Volume (Eaches)] = 0, 'NoDemand')))))

    

FROM

(qvd);

Now the next step to accomplish, i need advise how to do it better. The data sample looks as follows

    

WeekMaterialLocDFC
W06-181234USD4
W06-182345IND230
W06-183456FR450
W06-181234UK36
W07-181234USD9
W07-182345IND237
W07-183456FR455
W07-181234UK41

Now i need to calculate difference in DFC  of that specific week & material & Loc in a new column.

Regards,

Neelima.

4 Replies
techvarun
Specialist II
Specialist II

Share some sample data.

bushpalaamarnat
Creator
Creator
Author

The data sample looks as follows

   

WeekMaterialLocDFC
W06-181234USD4
W06-182345IND230
W06-183456FR450
W06-181234UK36
W07-181234USD9
W07-182345IND237
W07-183456FR455
W07-181234UK41
bushpalaamarnat
Creator
Creator
Author

DO any one see a solution? kindly help.

bushpalaamarnat
Creator
Creator
Author

out put required.png

If you notice in the image, i am trying to get the difference between that week's materia & loc combination with next weeks for DFC parameter. Could any one assist.