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

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
yelin_nyu
Creator
Creator

set analysis didn't work

i used

sum({$<FORECAST_YEAR={'$(=vSelectedYear)'}, FORECAST_TYPE_ID={"*"}-{F}, REGION_ID=>} $(vValue))

but FORECAST_TYPE_ID={"*"}-{F} didn't work, i still get values when i select F.  but this worked FORECAST_TYPE_ID-={F} with ugly red line. why first case didn't work?

i had a similar expression

sum({$<FORECAST_YEAR={'$(=vSelectedYear)'}, REGION_ID={'*'}-{NA}>}qty)

and REGION_ID={'*'}-{NA} worked great.

there is sync keys in my tables, but it's not related to FORECAST_TYPE_ID. what can possibly cause this set analysis equation to fail?

6 Replies
yelin_nyu
Creator
Creator
Author

ok i sort of figured out the problem. so when i select on forecast type id F, it still give me a value when forecast type id F is excluded. very interesting because i thought it should go to 0

whiteline
Master II
Master II

Hi.

Why dont you use quotes as F and NA are strings ?

Though you use it for asterix.

yelin_nyu
Creator
Creator
Author

a follow up question. trying to understand the difference here

this worked:

count(DISTINCT {$<PO_ID = {"*"} - {"33*"} - {"55*"}>} ITEM_ID )
so is this:

count(DISTINCT if(PO_ID like '33*' or PO_ID like '55*', null(), ITEM_ID))

but this didn't, why? is my syntax wrong

count(DISTINCT {$<~PO_ID = {"33*","55*"}>} ITEM_ID )

paul_scotchford
Specialist
Specialist

curious, what is the tilde prefixing PO_ID for ?

yelin_nyu
Creator
Creator
Author

isn't it for exclusion?