6 Replies Latest reply on Oct 22, 2018 6:21 AM by Delphine CARNET

# HOW TO SORT by one of the attribute within a dimension

Hello,

I have a field "Data" that shows the frequency: "Not Implemented", "Implemented". And I am trying to sort by "Implemented" only.

There is a filter on the side so I need this to be dynamic, that there is a sort by the highest to lowest of "Implemented".

The pic is sorted the way I want (manual) but it will get distorted when I choose another filter.

Can anyone help?

Delphine.

• ###### 1. Re: HOW TO SORT by one of the attribute within a dimension

Hi,

If you want to sort horizontally by the value of the frequency. You can create a calculated field that it takes into consideration only "Implemented" and use that measure for sorting only.

Also, if you want the "implemented" to be shown on the left side you can just reverse the axis.

I see that the questions are already sorted descending by this frequency. How have you done that by now? Manually?

Stefan

• ###### 2. Re: HOW TO SORT by one of the attribute within a dimension

Yes manually, but I'd like to add a country filter on the side but it get distorted when I change the country.

I thought of a calculated field but I can't write it properly. Any idea?

• ###### 3. Re: HOW TO SORT by one of the attribute within a dimension

try something like:

IF frequency='Implemented'

THEN COUNTD(respid)

ELSE NULL

END

and after you have the number you can sort the Question using this field.

• ###### 4. Re: HOW TO SORT by one of the attribute within a dimension

I get a "Cannot mix aggregate and non-aggregate comparisons or results in 'IF' expressions"...

• ###### 5. Re: HOW TO SORT by one of the attribute within a dimension

try with some values

IF frequency='Implemented'

THEN 1

ELSE 0

END

this should work

• ###### 6. Re: HOW TO SORT by one of the attribute within a dimension

IT WORKS! Thank you!