Qlik Community

QlikView Layout & Visualizations

Discussion Board for collaboration on QlikView Layout & Visualizations.

Not applicable

Legend sorting by volume


I'm having an issue with sorting a legend for a particular chart. It's sorting DESC, but what I'd really like to do is sort it based on the count of records. I tried changing the dimension to a formula hoping it would work, but it just returns an error. The formula I tried was =Dual(PRODUCT,Count(ID)). I hoped that this would count the records associated with each PRODUCT, but it didn't work. I thought I could then sort the legend numerically on the PRODUCT field

I can't attach the file unfortunalety, but I did mock up the chart to clearer define what I'm loking for. As you can see, the legend should be sorted by the numeric value after the product name (the numeric value doen't need to be present in the legend, it's just there to illustrate the sorting). Currently the legend sorts alphabetically DESC by the product name.

Thanks

Tags (2)
1 Solution

Accepted Solutions

Re: Legend sorting by volume

Go to the Sort tab

  • Highlight your dimension PRODUCT
  • Untick any ticked options for "Sort by"
  • Tick "Expression" to Sort by
  • Enter Count(ID) for your expression
  • Choose Ascending / Descending as per your needs.
4 Replies

Re: Legend sorting by volume

In your Chart properties

  • Go to the Presentation tab
  • Click <Settings>, top right in the Legend area
  • Tick <Reverse Order>
Not applicable

Re: Legend sorting by volume

Thank you for the reply. That helped switch the order to ASC alphabetically, but I still need to have it sort based on the total counts for each product.

Re: Legend sorting by volume

Go to the Sort tab

  • Highlight your dimension PRODUCT
  • Untick any ticked options for "Sort by"
  • Tick "Expression" to Sort by
  • Enter Count(ID) for your expression
  • Choose Ascending / Descending as per your needs.
Not applicable

Re: Legend sorting by volume

That did it. Thnk you!

Community Browser