Qlik Community

Ask a Question

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
Our next Qlik Insider session will cover new key capabilities. Join us August 11th REGISTER TODAY
cancel
Showing results for 
Search instead for 
Did you mean: 
qlikmpate0
Creator II
Creator II

Help with whatif scenarios

I have a table containing SKU and quantities for a PO.

I want to create different scenario so the correct quantity figure is used.

Scenarios:-

Where the SKU appears once I want to the Quantity  to show.

If the ITEM is repeated and committed quantity is null then I want to the Quantity only for the record where there is a value for quantity and committed quantity too. example SKUs where count=2 or can you use where record count is more than 1?

The column  'Figure to use' is the column I need to use. but I need to derive this. How do I do this? Can i compute this in script of use Set analysis in expressions?

I have attached an example. thanks in advance

2 Replies
aronwilliamson
Creator
Creator

Maybe something like this:

POLines:

LOAD [PO Number],

    if(Count>1 and not isnull(QUANTITY) and not isnull(QUANTITY_COMMITTED),SKU,"") as SKU,

    ITEM_DESCRIPTION,

    PO_LINE_ID,

    QUANTITY_COMMITTED,

    QUANTITY,

    [Figure to Use]

    ;

LOAD [PO Number],

    SKU,

    ITEM_DESCRIPTION,

    PO_LINE_ID,

    QUANTITY_COMMITTED,

    QUANTITY,

    Count,

//    [Zero and >1],

//    Different?,

    [Figure to Use]

FROM

[..\..\Purchasing\OtherDataSources\Sum up Adjusted Lines on PO.xlsx]

(ooxml, embedded labels, table is Sheet1);

aronwilliamson
Creator
Creator

I wasn't able to test but the idea here is to use resident load to manipulate the SKU field to only show if there conditions are true:


if(Count>1 and not isnull(QUANTITY) and not isnull(QUANTITY_COMMITTED),SKU,"")