Qlik Community

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
Customer & Partners, DEC. 9, 11 AM ET: Qlik Product & Strategy Roadmap Session: Data Analytics REGISTER NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

ValueList

I'm trying to create a conditional valuelist dimension. There is an error in my expression but the program does not indicate where. What is wrong?

//SubStringCount(Concat(_metricsNo, '|'), 1) outputs the number 1- I have tested this.

=ValueList(If(SubStringCount(Concat(_metricsNo, '|'), 1)=1,'Pr'),
If(SubStringCount(Concat(_metricsNo, '|'), 2),=1'Be'),
If(SubStringCount(Concat(_metricsNo, '|'), 3)=1,'LR'))

Thank you!

4 Replies
sunny_talwar

May be you need this:

If(GetSelectedCount(_metricsNo) > 0, Pick(_metricsNo, 'Pr', 'Be', 'LR'))

sunny_talwar

If this is not what you need, would you be able to share a sample with your expected output?

Not applicable
Author

This is the relevant script.

Metrics:
LOAD * INLINE [_metricsNo, _metrics
1, Pr
2, Be
3, LR

If _metricNo 1 field is selected, the value list should include the string 'Pr'

swuehl
MVP
MVP

I am not quite sure what you are trying to achieve, ,maybe just use _metrics as dimension?

Or

=ValueList(

$(=chr(39)&Concat(DISTINCT _metrics, Chr(39)&','&chr(39), _metricsNo) &chr(39))

)