2 Replies Latest reply on Apr 6, 2012 8:15 PM by Shawn Wallwork

    MID() Bug

    Shawn Wallwork

      To get a filter to sort the list like I want, I did the numbering trick, but I really don't want to show the numbers, so I tried trimming them off the front using MID() and came across this bug. Setting MID() to 1 doesn't trim anything; setting it to 2 trims 4 letters off the front (including the space):

      MID Bug.PNG

      MID Bug-2.PNG

      And I just tried it again, and got a different result: 1 now trims off 3 (including the space)

      MID Bug-3.PNG

      Which is what I was going for, but still not the way it should work. BTW, this is all for naught, since trimming the numbers off the front changes the sort order back to the way it was (what was I thinking?)

       

      --Shawn

       

      Edit: It could have something to do with the fact the I'm trimming aliases.

        • 1. Re: MID() Bug
          Tracy Rodgers

          Hi Shawn,

           

          Aliases are not recognized within calculated fields. Therefore, if this trick wanted to be used, another calculated field that assigned each member a new name will allow you to get the mid to work accordingly. Hope this helps!

           

          -Tracy

          • 2. Re: MID() Bug
            Shawn Wallwork

            Tracy, that explains things a bit, though why screen shot 1 & 3 aren't the same (even though the formula is the same) is a bit odd. But since I now can't recreate that same behavior, who knows. FYI: I didn't put the aliases on the dimension [Store Name] -- as you pointed out aliases don't survive calculated fields (just like number formatting ). Instead I put the aliases on the calculated field/filter itself. What's rather interesting (curious) is that using MID() to trim the dimension, effect the calculation aliases.

             

            Not that any of this matters, because what I really want is the ability to manually sort the order quick-filter options are displayed (you hearin' this Jun?).

             

            --Shawn