Solved

Sort by metric result highest number

  • 26 October 2023
  • 4 replies
  • 132 views

Userlevel 3
Badge +6
  • Newly Minted Pigmenteer
  • 21 replies

Hello!

Can someone please help how I can sort by highest number? I would like to sort the vendor name by 2023 Total amount. 

Thank you!

 

 

icon

Best answer by Benoit 27 October 2023, 17:12

View original

4 replies

Userlevel 6
Badge +12

Hi Yaejis,

Unfortunately the sorting feature can not be used on aggregators.

It works only on dimension properties or metric values.

 

A good workaround is:

  • create a new integer property in your Vendor_OP dimension called something like “Rank 2023” where with a formula you rank your Vendors based on your metric 2023 total amount
  • go back on your metric and add a sort on Vendor_OP using your new ranking property

 

 

Hope this helps.

 

Best,

Userlevel 3
Badge +6

Thanks for suggesting workaround option! 

 

I created two properties -  1)  to get 2023 total amount (like a stage) and 2) for final output to Rank based on #1. 

Can you please help on the Rank formula? I tried but seems the result doesn’t look right.

 

Thank you!

 

 

Userlevel 6
Badge +12

What is the current formula you have?

You should be able to use the rank function

 

Rank(Vendor_OP.’2023 Total (A+F)’) should work

If zeros are listed as third position, it means maybe you have 2 negative values.

To verify, maybe you could go to your metric and use the sorting to see if it renders correctly?

Userlevel 3
Badge +6

Ah, formula is simpler than expected. Thank you!

Reply