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

    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.