3 Replies Latest reply on Oct 20, 2016 4:50 PM by Ivan Young

    Parameter display 5 or more measure

    Mac Chadwick Ranier Tolentino

      Hi Guys,

       

      Is there a way that I could use "All" in a parameter.

       

      By means of "All", I could display 5 or more measure?

       

      Example:

       

      CASE [Parameter]

      WHEN 'All'

      THEN

                [Measure1] , [Measure2] , [Measure3] , [Measure4] , [MeasureN]

      END

       

      Thanks

        • 1. Re: Parameter display 5 or more measure
          Ivan Young

          You could probably build something like this with five calculated fields but it seems like using measure names as a filter would make more sense. 

           

           

          Calc 1

          CASE  [Measures]

          WHEN 'All' THEN

          [Sales]

          WHEN 'Sales' THEN

          [Sales]

          END

           

          Calc 2

          CASE [Measures]

          WHEN 'All' THEN [Profit]

          WHEN 'Profit' then [Profit]

          END

           

           

           

          Using Measure names provides a cleaner look

          1 of 1 people found this helpful
          • 2. Re: Parameter display 5 or more measure
            Arijit Ghosh

            Brilliant answer by ivan.yong

             

            I was thinking of a different way-

             

            CASE [Parameter]

            WHEN 'All'

            THEN

                      [Measure1] + '|' + [Measure2] + '|' + [Measure3] + '|' + [Measure4] + '|' + [MeasureN]     /* using | as delimiter */

            END

             

            and then seperating the measures by spliting from delimiters. If a single meaure was choosen remaining fields would automatically stay Null.

             

            Regards,

            • 3. Re: Parameter display 5 or more measure
              Ivan Young

              Very Interesting, I think you will need to convert you measures to STR in order to avoid type mismatch when adding your delimiter.  Then convert back to a number after splitting if you want to aggregate.  Too much work for me, but if you mock something up please share.  I would pursue a measure names single select dropdown first as it seems clean and easy.