Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements
QlikView Fans! We’d love to hear from you.
Share your QlikView feedback with the product team… Click here to participate in our 5-minute survey.
Rules, plus terms and conditions, can be found here.
joshrussin
Contributor II

Excel formula equivalent in a script?

Hey everyone,

I am trying to see if there is a way to manipulate this into a script somehow. I am trying to create this WIP Inbound column. The formula is

WIP Inbound = (Today's WIP - (Yesterday's WIP - Today's Processed))

KPI_0043.jpg

Thanks!

5 Replies

Re: Excel formula equivalent in a script?

May be this?

Sum({<Date = {'$(=Max(Date))'}>} WIP) - (Sum({<Date = {'$(=Max(Date -1))'}>} WIP) - Sum({<Date = {'$(=Max(Date))'}>} Processed))

Life is so rich, and we need to respect to the life !!!
joshrussin
Contributor II

Re: Excel formula equivalent in a script?

I am trying to get the values for a table. Just the expression doesn't give me what I want. Looking for a way to add this into my table LOAD in the script.

pradosh_thakur
Honored Contributor II

Re: Excel formula equivalent in a script?

can you try this

1:sort say table A by Area,date such that area 'a' with all dates comes first then 'b' then the next area and so on.

2:use the above table as resident load or preceding load and add an extra column "yesterday's WIP" useing peek('WIP',ROWNO()-1,'A')

3: Then calculate the new column (WIP-(yesterday's WIP-Processed) as the new column "WIP inbound"

regards

Pradosh

Learning never stops.
mwoolf
Honored Contributor II

Re: Excel formula equivalent in a script?

My reply is like Pradosh's.

Maybe something like this

Temp:

noconcatenate

Load

     Date,

     Area,

     Program,

     if(Date=peek('Date') and Area = peek('Area') and Program = peek('Program'),

          Rangesum(WIP,Processed,peek('WIP'))) as [WIP Inbound],

     Processed,

     WIP

resident YourTable

order by Area,Program,Date;

drop YourTable;

rename Temp to Yo

joshrussin
Contributor II

Re: Excel formula equivalent in a script?

I am getting "-" when I use this format. Here is my file.

Community Browser