Search for answers here or ask a question
0

Discover: sort isn't working as expected

As shown above, sort is set to order by the average score measure, however the visual is still showing bars not sorted properly.

3replies Oldest first
  • Oldest first
  • Newest first
  • Active threads
  • Popular
  • Hi Yvonne,

    thanks for the questions. I think the community will need more information to give you an answer.  Could you share more about the situation, when you run into this? Something like:

    • What Pyramid Version are you using?
    • What about a Screenshot? (Including the Dimensions, Measures and Dropzones)
    • How would one replicate the issue?

    Rgds
    Christian

    Like
    • Ian MacdonaldAdmin
    • Team Lead - Product Management
    • Ian_Macdonald
    • 2 wk ago
    • Official response
    • Reported - view

    Hi Yvonne,

    Yes, it is working correctly.

    Your measure, Average Score, is calculated for the scope you have defined. For each company you are showing the average for each area as different colours. You are then showing the averages of each area for each company as a stacked bar, i.e. the height of the stacked bars is equal to the SUM of the each Company / Area Average.

    You are then sorting Company by Ascending Average Score. So Pyramid calculates the Average Score for each Company and orders them accordingly. Which gives you the order you have above. It DOES NOT add up the average scores for each Area for Each Company and then sort using that SUM.

    To prove this, create a new simple grid report and show company and average score, then sort by average score. You will find the order to be as in your chart.

    You must remember, that what you sort by does not necessarily have to be on the chart.

    To produce the ordering you want, you will need to create a new measure which is the sum of the averages of Area, then sort company by this measure.

    Here's an example. 

    Margin is aggregated in my model as Average Margin. Here is Manufacturer showing the Margin for each Product Category as stacked bar, sorting by Margin.

    Sorting Manufacturer by Margin in a grid shows the same order:

    Now create the SUM of Product Category Margins as a Measure:

    And sort Manufacturer by this Measure:

    And the result:

    I'm not sure what value there is in adding up the margins of Category, but it's your analysis!

    Hope that helps.

    Ian

    Like 1
      • Yvonne Teng
      • Yvonne_Teng
      • 11 days ago
      • Accepted
      • Reported - view

      Ian Macdonald Thank you so much! Creating the sum variable solved the issue.

      Like
Like Follow
  • Status Answered
  • 11 days agoLast active
  • 3Replies
  • 23Views
  • 3 Following