3 Replies Latest reply: Nov 13, 2014 5:27 PM by Ryuma Nakano

# Selection and Set analysis Issue

Hello,

I am having an issue with my set analysis in a chart.  Below is my expression:

=if(_TimePeriod = '1 MONTH', Sum({\$<Measure={'TEB'}, ProductId = {1}, IsCurrentMonth = {1}>} Qty),

if(_TimePeriod = '3 MONTHS', Sum({\$<Measure={'TEB'}, ProductId = {1}, Is3Month = {1}>} Qty),

if(_TimePeriod = '6 MONTHS', Sum({\$<Measure={'TEB'}, ProductId = {1}, Is6Month = {1}>} Qty),

if(_TimePeriod = 'QTD', Sum({\$<Measure={'TEB'}, ProductId = {1}, IsQtd = {1}>} Qty)))))

And so when I want to conditionally show another expression:

=if(_TimePeriod = '1 MONTH', Sum({\$<Measure={'TEB'}, ProductId = {1,2}, IsCurrentMonth = {1}>} Qty),

if(_TimePeriod = '3 MONTHS', Sum({\$<Measure={'TEB'}, ProductId = {1,2}, Is3Month = {1}>} Qty),

if(_TimePeriod = '6 MONTHS', Sum({\$<Measure={'TEB'}, ProductId = {1,2}, Is6Month = {1}>} Qty),

if(_TimePeriod = 'QTD', Sum({\$<Measure={'TEB'}, ProductId = {1,2}, IsQtd = {1}>} Qty)))))

The Values for ProductId 2 are not showing up and I cannot figure out why.  It seems like I am licked into a weird selection, where productId = 1.

• ###### Re: Selection and Set analysis Issue

Try

ProductId = {'1','2'}

• ###### Re: Selection and Set analysis Issue

No change, unfortunately

• ###### Re: Selection and Set analysis Issue

Try using multiple expressions and the conditional to calculate each one of those, that way you could also debug it a lot easier