Forum Discussion

hymieho3's avatar
hymieho3
Microsoft Employee
6 years ago
Solved

Sort bar chart by summarized (ranked) responses

Link to sample file below.

EDIT: the solution below works for this data set but it does not work on the real report. I am afraid I simplified the model too much.  Does anyone else have an idea of how to create a measure that produces this based on the data model below?

-----------

Original post:

I am summarizing responses to a survey where respondents rank options. I have created a bar chart that shows the number of responses by their rank, and now I would like to sort the chart so the option that people chose as #1 is at the top, etc., but I can't figure out how to do this. It needs to be dynamic so it will respond to slicers on the page.

 

My idea was to create a measure to put in the chart's tooltip so I can then sort on it, but I cannot figure out the logic for that measure. I am able to create a table variable which has the summary data (below), but the rest is beyond me... Any ideas?

 

 

THANKS!

 

In the sample file, the Y-axis should be sorted in the following order

  1. Blue (most responses as 1st choice)
  2. Yellow (most responses as 2nd choice)
  3. Orange (etc.)
  4. Red

 

sample file

 

  • Hi hymieho3 ,

    Try this:

     

    Best Regards,
    Icey

     

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

1 Reply

  • Icey's avatar
    Icey
    Community Support

    Hi hymieho3 ,

    Try this:

     

    Best Regards,
    Icey

     

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.