Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

dseelam
Contributor II

Status

Hello All,

Please check attachment, would like to create a filter by status using the same expression in the straight table

11 Replies
vishsaggi
Esteemed Contributor III

Re: Status

Did not get you what you want to see in your sheet as an output?

dseelam
Contributor II

Re: Status

Hey Vishwa,

Thanks for the reply, would like to create a filter by status using the same expression in the straight table

vishsaggi
Esteemed Contributor III

Re: Status

Try this in your listbox expr:

= if(Item.STATUS_COMP='P',Item.STATUS_COMP,

    if(Aggr(sum(ASCP.DMND), ASCP.ITEM, ASCP.ORG) > 0,

        if(Aggr(sum(ASCP.ON_HAND-ASCP.DMND), ASCP.ITEM, ASCP.ORG) < 0,'A','S'),'P'))

Capture.PNG

dseelam
Contributor II

Re: Status

Vishwa,

this is what happening when I select 'A ' from filterCapture.PNG

sasiparupudi1
Honored Contributor III

Re: Status

if(Item.STATUS_COMP='P',Item.STATUS_COMP,

IF(Aggr(sum(ASCP.DMND),ASCP.ITEM,ASCP.ORG)>0,if(Aggr(sum(ASCP.ON_HAND-ASCP.DMND),ASCP.ITEM,ASCP.ORG)<0,'A','S'),'P'))

dseelam
Contributor II

Re: Status

Hello Sasi,

It is the same expression what Vishwa posted it's giving me wrong selections when I select something from the filter as the screenshot above.

thanks

sasiparupudi1
Honored Contributor III

Re: Status

May be try

=If(Item.STATUS_COMP='P',Item.STATUS_COMP,

If(Aggr(sum(ASCP.DMND),ASCP.ITEM,ASCP.ORG)>0 AND Aggr(sum(ASCP.ON_HAND-ASCP.DMND),ASCP.ITEM,ASCP.ORG)<0,'A','S'))

vishsaggi
Esteemed Contributor III

Re: Status

Can you break down your requirement for status A, P and S please. There is something to be tweaked around your if conditions. Please break down individually and let us know so that we can rebuild the expressions. Like what is the condition to get A, P and S accordingly.

dseelam
Contributor II

Re: Status

Tried it seems like a glitch see attached if I select 'A'Capture.PNG

When I select 'S', 'P' is working fineCapture1.PNG