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

Announcements
Qlik GA: Multivariate Time Series in Qlik Predict: Get Details
cancel
Showing results for 
Search instead for 
Did you mean: 
davymichiels
Contributor
Contributor

Is it possible to add an 'active' column to a table

Hi there,

I am looking for a solution for the following problem:

I need to get a future potential stock figure for every article in the selection (Actually I need to visualize when the stock will be insufficient)

My dimension = the article

My expressions = the incoming and outgoing order nrs, order quantities and dates

Table is sorted on these dates

Now, how can I get Qlikview to calculate column 'POTENTIAL' ?

articlestock todayincoming order
incoming dateincoming qtyuitgoing order
outgoing dateoutgoing qtyPOTENTIAL
article A500125665april 15+200700
article A500355601april 20-500200
article A500357022april 27-500-300
article B90351055april 14-8010

Kind regards

Davy

3 Replies
Chanty4u
MVP
MVP

just u can add one more expression to ur table as Potential.

sunny_talwar

May be this:

Table:

LOAD article,

    [stock today],

    [incoming order],

    [incoming date],

    [incoming qty],

    [uitgoing order],

    [outgoing date],

    [outgoing qty],

    Alt([incoming date], [outgoing date]) as DateSort

FROM

[https://community.qlik.com/thread/211744]

(html, codepage is 1252, embedded labels, table is @1);

FinalTable:

LOAD *,

  If(article = Peek('article'), RangeSum(Peek('POTENTIAL'), [incoming qty], [outgoing qty]) , RangeSum([stock today], [incoming qty], [outgoing qty])) as POTENTIAL

Resident Table

Order By article, DateSort;

DROP Table Table;


Capture.PNG

davymichiels
Contributor
Contributor
Author

Thanks for the info but I ain't so good in scripting...

The article and order data are already 2 databases loaded in te script.

So i'd like to find the solution without messing with the script.

In the extra expression "potential" I can calculate on 'stock today'

but the 2nd line should be calculated not on stock today but on previous line in "potential"

and that is where I'm stuck.

I can't get all the in and outcoming on 1 line because I need 1 line per date