Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
4 years ago
Solved

Sorting slicer values based on a separate field

We have a project report that is split by the overall RAG status for the projects, Red and Amber appear on one page, with Green on a separate page.  That side of it is controlled by a filter on the RAG field.  On the Red/Amber report page we have a slicer, listing the Red/Amber RAG projects,  that allows you to deep-dive each project, to display a whole bunch of visuals for the selected project.

 

What I'd like to do is sort the slicer to have the Red projects at the top of the pick list, followed by the Amber projects.

 

I've seen a number of queries, but most of these are centred on date sorting, is there a way to sort a slicer based on a totally separate field ?

 

Thanks in advance for any suggestions

Regards

Fred

  • Anonymous's avatar
    Anonymous
    4 years ago

    Hi amitchandak 

     

    Found a solution, and now understand the Youtuve video you referenced.

     

    I went to the Data view, selected the table/field I needed to sort and then, on the Column tools tab, used the "Sort by column" option.  In the list of fields, I selected the field I needed the Project Names to be sorted by, Overall RAG.  That gave me a partial success (we have Green=1, Amber=2, Red=3), so with the page filtered to show only Red & Amber (3 & 2) the order of the projects was wrong as the "Sort by column" doesn't have the ascending/descending option available and only sorts ascending, meaning that the Amber projects were listed before the Red. 

     

    With a little DAX I created a "reverse sort" column and used that as my "Sort by column" allowing the slicer to show Red projects first, followed by Amber.

     

    SUCCESS !

     

    Thanks for the ppointer to the video, it set me on the right path

     

    Fred

3 Replies

    • Anonymous's avatar
      Anonymous
      Not applicable

      Hi amitchandak 

       

      Found a solution, and now understand the Youtuve video you referenced.

       

      I went to the Data view, selected the table/field I needed to sort and then, on the Column tools tab, used the "Sort by column" option.  In the list of fields, I selected the field I needed the Project Names to be sorted by, Overall RAG.  That gave me a partial success (we have Green=1, Amber=2, Red=3), so with the page filtered to show only Red & Amber (3 & 2) the order of the projects was wrong as the "Sort by column" doesn't have the ascending/descending option available and only sorts ascending, meaning that the Amber projects were listed before the Red. 

       

      With a little DAX I created a "reverse sort" column and used that as my "Sort by column" allowing the slicer to show Red projects first, followed by Amber.

       

      SUCCESS !

       

      Thanks for the ppointer to the video, it set me on the right path

       

      Fred

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi amitchandak ,

    Unfortunately there's no Tooltips option on a Slicer visual, which is where I want to apply a Sort.  The Sort option on the slicer only shows the field you are slicing on, nothing else, which is my problem.
    The Youtube, interesting, but it makes no mention of sorting a slicer on an alternative field, which is what I'm trying to achieve.  Instead it, like so many other solutions, relates to dates in visuals, which is not what I am trying to do.

    I would like to sort the project names, in the slicer, based on a Project Rag field, but there appears to be no way to select an alternative sort field.  I've tried using the Hierarchical slicer, but that simply gives Sort Ascending/Descending but no field options to select.

     

    Stumped 🙂

     

    Regards

    Fred