Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
I have a bar chart with two expression showing the sales of the products A and B in columns. Moreover I have a list box with these two products.
I want the bar chart to display the products I select in the list box, so:
> If I select product A I just want product A to be displayed in the bar chart.
> If I select product B I just want product B to be displayed in the bar chart.
> If I select product A and B I want product A and B to be displayed in the bar chart.
Which is the conditional I should use in the conditional expression ?
thanks,
dani
try this,
if(product A,1,if((product A and product B),1,0)) and similar for product B
Why can't you add the Products dimension to your bar chart? That way you won't need to mess around with conditional expressions.
You could use this if you do need/want to use conditional expressions and your products dimension is named Product:
For product A: if(substringcount(concat(distinct Product & '~', ','), 'A~')),1,0)
For product B: if(substringcount(concat(distinct Product & '~', ','), 'B~')),1,0)
try this,
if(product A,1,if((product A and product B),1,0)) and similar for product B