I have an inputbox which limits user selection to week,month and ytd. I presumed they would be a text hence added single quotation to each of those however the drop-down displays quotation as well which is undesirable. If I add these values without quotations then they will look fine but lead to another issue. I have another variable which convert user selection to numeric value, e.g. week=0,month=1 and ytd=2 and the if statements seem only work with quotation for text values. Can anyone sheds some lights?
Not sure of exact need but you can always use num() function to convert text number data to numeric. Its better to use numeric values as long as possible, normally Qlik internally takes care of which type to be used as each value is stored as dual(text and numeric) internally.
The dual value could act as a numeric or as a text value depending on the context. Rather than a variable use this field in a list box and set the Always One Selected Value property. You can then use this field in your set expressions and filter logic.
Logic will get you from a to b. Imagination will take you everywhere. - A Einstein