2 Replies Latest reply: Oct 3, 2011 9:14 AM by mnistor1 RSS

    List Box & Bar Chart Expression Not Linked



      I'm in need of some help with controlling a Bar Chart with a List Box. I'm trying to get a Bar Chart with 3 separate bars, one for each group as can be seen in the List Box breakdown below. What I would like to happen is to select one or more of the 3 values in the list box (North America, EMEA or Asia & Others) and have the corresponding bar appear/disappear depending on what is selected. There seems to be a disconnect between the expression as a field in the List Box and the corresponding expressions in the Bar Chart. Regardless of what is selected in the List Box, the Bar Chart remains the same showing all 3 bars. The only item that reacts to the List Box selection is the simple expression "count(WRLD_RGN)" which counts all values and puts them into 1 bar instead of breaks them into separate bars as I would like. This is not what I want, but I wanted to see if anything reacted to the list box so this was just a test bar of sorts. Any help is appreciated!


      My List Box has the following expression as a field in order to group the actual field values:

      =if(WRLD_RGN='Lat.Amer','North America'

      ,if(WRLD_RGN='N.Amer','North America'

      ,if(WRLD_RGN='Caribbean','North America'





      ,if(WRLD_RGN='Oceania','Asia & Others'

      ,if(WRLD_RGN='Supra','Asia & Others'

      ,if(WRLD_RGN='Asia','Asia & Others'

      ,if(WRLD_RGN='OffShore','Asia & Others'

      ,if(WRLD_RGN='India','Asia & Others'))))))))))))


      My Bar Chart as the following expressions:

      count({<WRLD_RGN={'Oceania','Supra','Asia','OffShore','India'}>} WRLD_RGN)

      count({<WRLD_RGN={'Africa','E.Eur','Europe','MiddleEast'}>} WRLD_RGN)

      count({<WRLD_RGN={'Lat.Amer','N.Amer','Caribbean'}>} WRLD_RGN)



      and the following dimension which is irrelevant in my mind: LT_RTNG

        • Re: List Box & Bar Chart Expression Not Linked
          Stefan Wühl

          I think your list box and bar chart is connected very well, but you set a new selection to WRLD_RGN in your set expression, so the actual selection in your list box is not taken into account.


          add a WRLD_RGN * to the assignment to WRLD_RGN just after the equal sign (or use *=), like in


          =count({<WRLD_RGN=WRLD_RGN*{'Oceania','Supra','Asia','OffShore','India'}>} WRLD_RGN)


          This should do the trick.





          you might also consider using a separate table to link your regions to your classification maybe like


          LOAD * INLINE [


          Lat.Amer,North America

          N.Amer,North America

          Caribbean,North America





          Oceania,'Asia & Others'

          Supra,'Asia & Others'

          Asia,'Asia & Others'

          OffShore,'Asia & Others'

          India,'Asia & Others'



          Then you could use SALESREGION as a listbox as well as a dimension field in your chart.