- Sort Column functionality in Adhoc is not behaving as expected.
- Data in Adhoc report is getting sorted in reverse manner than what is selected.
Reproducing the Issue
- Go to Adhoc Report
- Sort the report using Sort Column functionality under Columns tab.
- Ex: Sort report on columns Country and Degree( both ascending).
4. Preview the report and you will see that the data is not getting sorted correctly for Degree column. Instead of ascending it is sorted in descending order.
- Check if the column which is not getting sorted in correct manner is a picklist column or not. If yes, then check the below steps:
- Sorting functionality for picklist columns in Adhoc sort data based on the Picklist Option ids and not the Labels.
- Go to Admin Center -> Picklist Management and download the Picklist.( Not the order of the Option Id and the Labels)
- In order to confirm the above mentioned cause in Adhoc, change the configuration of the column to show the Picklist Option Id instead of Label.
- Go to Configuration Tab in Adhoc and click Show Value ID configuration.
- Check the Show Value ID configuration in front of the column name.
- Now preview the report and you will see that the report is getting sorted correctly on the basis of Option Id.
- You will see that the Picklist Labels in the Adhoc report get sorted based on the Option id. ( Label with less Option id will display first in the report when sorted in ascending order).
- In order to get the Labels sorted in correct manner in Adhoc, customer have to change the order of the Labels in Picklist and arrange them according to the Picklist Option Id order.
- If Option id is in ascending order then put the labels in ascending order and vice versa.
Sorting in Adhoc Sort Columns Picklist columns , KBA , LOD-SF-ANA , Analytics & Reporting (Ad Hoc, ORD) , How To