0 Replies Latest reply: Jun 24, 2015 3:44 AM by Linus Blomberg RSS

    Listbox filtered values

    Linus Blomberg

      I have a dimension with a hierarchy that changes every year. Maybe I can solve this by altering the the model but I would really like to know if there is an expression I can write in a listbox to filter my values.

       

      Dimension:

      YearLevel1Level2
      2015FruitsApple
      2015FruitsBanana
      2015FruitsOrange
      2014AppleSubApple
      2014BananaSubBanana
      2014OrangeSubOrange

       

       

      So If I put Level1 as a dimension I want to filter it to only show the rows relevant to the selected year.

           I do not want to tick 'Hide Excluded' because I want to show the excluded values (Just not for the other years)

          

      If I make an expression as the field in the listbox, i.e

           if(Year=GetFieldSelections(Year),Level1)

           it works. But!, when I then select/deselect my fruits in the listbox I also select/deselect Year!? and if I go to my year listbox and tick 'always one selected value' then I cant deselect my fruits in Level1 listbox.

       

      Is there another expression I can use? can I use set analysis in anyway?

       

      Grateful for any tips.