2 Replies Latest reply on Jun 23, 2016 7:41 AM by Orlando Suarez

    Need Calculation that sorts in alphabetical order to tie into Parameter control

    Orlando Suarez

      Could use a little help here folks. First let me explain what I've done so far:

       

      I created a parameter control called "Sort By" that allows a user to sort columns uniformly for car models by:

      % of Total

      M/M %

      Y/Y %

      Seg. Rank

       

      To power that parameter I created a calculation in Measures called "Sort % and rank" with a CASE / WHEN statement that references the [individual calculations] for each column. This "Sort % and rank" Measure Pill was placed on the Columns shelf.

      Sort % and rank calculation.png

      I then created the "Sort By" Parameter control in the following manner:

      Sort by Parameter1.png

      NOW I want to add a 5th option to the "Sort by" parameter. This NEW FIFTH option is "Model". I want this to place the all car models in Alphabetical order in the column and I want this "Model" column to be the default setting for all sorting. So everytime a user opens the dashboard; the dashboard is always defaulting first to the alphabetized "Model" column.

       

      So as you can see in the "Sort by" parameter control picture above, I added a 5th line and placed "Model" under "Display as". However the parameter is going to need to go back to the "Sort % and rank" calculation and reference the CASE/WHEN statement for a 5th line there. Here is where I need the help. What calculation can I create that will alphabetize the "Model" dimension so in turn I can throw that calculation into the CASE/WHEN statement inside of the "Sort% and rank" calculation that powers the parameter????

       

      Below is a larger view of everything together:

       

      Sort by MODEL - Alphabetical .png

      THANKS!!!