Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Filter not working well

Hi all,

I have a very low level question but i'm not being able to solve it…

In order to build a bar chart I wrote this expression

sum({<ProdmktOrc={"CA*", "C1*", "C6*", "C7*"}, OrdItemMillAlloc={'ATF','FIG','SET'}, OrdItemProdCd={*}-{"SHT"},OrdMasterOrdType={'CUST','STOCK-WHSE'}, OrdItemOrdStat={"CONFIRM","COMPLETE","HOLD"}>}if(OrdItemDelDate<>OrdMasterOrdDate, OrdItemOrdKgs))/1000

   

I have two concerns about this:

1. the OrdItemMillAlloc=USA is still available for selection, even though i'm excluding it in the expression. Is this correct? I thought it would apper in dark grew as 'set' and 'VVR'.

2. I cannot display values for only one of the OrdItemMillAlloc. Even  if I select ATF or any other mill, the visualization remais the same without changing values … I thought that I would be able to filter the visualization to analyse only my ATF orders…

I've already done a lot of expressions like this one and they have always worked… I'm not understanding whats happening now.

Any help would be appreciated! Thank you

Sofia

1 Solution

Accepted Solutions
pradosh_thakur
Master II
Master II

Hi Sofia

sum({<ProdmktOrc={"CA*", "C1*", "C6*", "C7*"}, OrdItemMillAlloc={'ATF','FIG','SET'}, OrdItemProdCd={*}-{"SHT"},OrdMasterOrdType={'CUST','STOCK-WHSE'}, OrdItemOrdStat={"CONFIRM","COMPLETE","HOLD"}>}if(OrdItemDelDate<>OrdMasterOrdDate, OrdItemOrdKgs))/1000


The above expression will exclude the selection on OrdItemMillAlloc and the corresponding values for 'ATF','FIG','SET' will be shown . Thats what set analysis does and used here.


but if you want to select one from 'ATF','FIG','SET' when you want you can use either from below expressions


sum({<ProdmktOrc={"CA*", "C1*", "C6*", "C7*"}, OrdItemMillAlloc *={'ATF','FIG','SET'}, OrdItemProdCd={*}-{"SHT"},OrdMasterOrdType={'CUST','STOCK-WHSE'}, OrdItemOrdStat={"CONFIRM","COMPLETE","HOLD"}>}if(OrdItemDelDate<>OrdMasterOrdDate, OrdItemOrdKgs))/1000



or



sum({<ProdmktOrc={"CA*", "C1*", "C6*", "C7*"}, OrdItemMillAlloc ={'ATF','FIG','SET'}, OrdItemProdCd={*}-{"SHT"},OrdMasterOrdType={'CUST','STOCK-WHSE'}, OrdItemOrdStat={"CONFIRM","COMPLETE","HOLD"}> * <OrdItemMillAlloc =p(OrdItemMillAlloc)>}if(OrdItemDelDate<>OrdMasterOrdDate, OrdItemOrdKgs))/1000


Learning never stops.

View solution in original post

4 Replies
ali_hijazi
Partner - Master II
Partner - Master II

point 1 yes even if you are excluding the value USA it will stay as white in the listbox because in list boxes reflect what actually is related and excluded in current selection set of data ; in your expression you are calculating a measure in a different set of data (overwriting what the actual current selection is)

point 2 if you want to show only ATF when you select ATF then you have to modify your expression and write:
OrdItemMillAlloc *={'ATF','FIG','SET'} or you aggregate your expression by OrdItemMilAlloc

hope this helps

I can walk on water when it freezes
Anonymous
Not applicable
Author

Thank you Ali,

thanks for the explanaition about point 1.

Regarding point 2, I don't want to modify the expression because, by default, I want to the the value for all MillAlloc. The requirement is that, later, I'll maybe want to analyse only one of the millalloc.

pradosh_thakur
Master II
Master II

Hi Sofia

sum({<ProdmktOrc={"CA*", "C1*", "C6*", "C7*"}, OrdItemMillAlloc={'ATF','FIG','SET'}, OrdItemProdCd={*}-{"SHT"},OrdMasterOrdType={'CUST','STOCK-WHSE'}, OrdItemOrdStat={"CONFIRM","COMPLETE","HOLD"}>}if(OrdItemDelDate<>OrdMasterOrdDate, OrdItemOrdKgs))/1000


The above expression will exclude the selection on OrdItemMillAlloc and the corresponding values for 'ATF','FIG','SET' will be shown . Thats what set analysis does and used here.


but if you want to select one from 'ATF','FIG','SET' when you want you can use either from below expressions


sum({<ProdmktOrc={"CA*", "C1*", "C6*", "C7*"}, OrdItemMillAlloc *={'ATF','FIG','SET'}, OrdItemProdCd={*}-{"SHT"},OrdMasterOrdType={'CUST','STOCK-WHSE'}, OrdItemOrdStat={"CONFIRM","COMPLETE","HOLD"}>}if(OrdItemDelDate<>OrdMasterOrdDate, OrdItemOrdKgs))/1000



or



sum({<ProdmktOrc={"CA*", "C1*", "C6*", "C7*"}, OrdItemMillAlloc ={'ATF','FIG','SET'}, OrdItemProdCd={*}-{"SHT"},OrdMasterOrdType={'CUST','STOCK-WHSE'}, OrdItemOrdStat={"CONFIRM","COMPLETE","HOLD"}> * <OrdItemMillAlloc =p(OrdItemMillAlloc)>}if(OrdItemDelDate<>OrdMasterOrdDate, OrdItemOrdKgs))/1000


Learning never stops.
Anonymous
Not applicable
Author

Thank you Pradosh! Both work!!