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: 
Not applicable

Two Alternate states in a line chart

Hi,

I want to compare two products overs period of time.

I am trying to use a valuelist and pick function to get the out put. but only first part of the expression work which is also work when i make only selection in field.

The second expression is not all working:

Dimensions:

1. Month year:

2. =pick(ValueList( $(=Concat(distinct  {Sample<MetricID={2}>} chr(39)&[Products] & chr(39),',')) ),

ValueList( $(=Concat(distinct  {Sample2<MetricID={2}>} chr(39)&[Products] & chr(39),',')) ))

Expression:

pick(match(   ValueList( $(=Concat(distinct  {Sample<MetricID={2}>} chr(39)&[Products] & chr(39),',')) ), $(vProductsList1)),

sum({Sample<MetricID={2}>}

[sales]),

sum({Sample2<MetricID={2}>}

[sales]))

Variable definition:

vProductsList1=Chr(39)&Concat(DISTINCT {Sample<MetricID={2}>}[Products],Chr(39)&Chr(44)&Chr(39))&Chr(39)

Any help would be appreciated.

Thanks,

Mohan K

4 Replies
swuehl
MVP
MVP

Shouldn't your second dimension just be

2. =ValueList( $(=Concat(distinct  {Sample<MetricID={2}>} chr(39)&[Products] & chr(39),','))

?

If this is not resolving your issue, could you upload a small sample QVW?

Not applicable
Author

Hi Swueha,

Thanks for spending your time, I can't go with single dimension. i need my report should work based on the selections in both the list boxes.

swuehl
MVP
MVP

Not really sure what you are trying to achieve.

Attached sample is showing how I would combine your two alternate states into one chart.

Not applicable
Author

Hi Swuehl,

Thanks a lot for the solutions, it almost covers my requirement.

I have come up with another solutions , it works fine