Skip to main content
Announcements
NEW: Seamless Public Data Sharing with Qlik's New Anonymous Access Capability: TELL ME MORE!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

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.

Thank you for your help.

3 Replies
MK_QSL
MVP
MVP

Try

ProductId = {'1','2'}

Not applicable
Author

No change, unfortunately

Not applicable
Author

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