Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
When using 'only' in set analysis for dynamic functionality, it seems to work well with numerical fields but not character ones.
The classic year example from the manual displays:
sum( {$<Year = {$(=Only (Year))}>} Sales
This works just fine as year is a numerical field.
However trying to use 'only' with a character field like below:
sum({$<Facility -= {$(=Only(Primary_Facility))} >} Sales)
In the above example I am trying to select all facilities except the primary facility. I am aware that I can use 1-$ but this is the only field I wish use the 'inverse' ability.
I'm a bit confused as to why this would not work.
Any help is appreciated. Thank you in advance!
dont you need to put ' ' infront of ? due to its a string.
Variable:
vPrimary = only(Primary_facility)
Expression:
sum({$<Facility -= {'$(vPrimary)'} >} Sales)
Did you actually select only one value for Primary_Facility?
It works fine for me. See attached example.
It would help if you could post a representative sample of the document you're working with. See here for how to create such an example.
dont you need to put ' ' infront of ? due to its a string.
Variable:
vPrimary = only(Primary_facility)
Expression:
sum({$<Facility -= {'$(vPrimary)'} >} Sales)
If it should work without selecting one value in Primary_Facility, try this:
sum({$<Facility -= P(Primary_Facility) >} Sales)
Regards,
Michael
Three years of QlikView and certified in developer and still making the rookie mistakes. I am shame faced. Thanks so much for your help guys, sorry for the bother.