Troubleshooting
Problem
When filter on the result of a rank expression the result is not correct.
Symptom
Wrong result set with filter applied on rank.
Cause
The order in which the result of the rank is created and the application of the filter is somehow not correct.
Diagnosing The Problem
When you filter to show the result for "rank < 21" you will not get the first 20 of the result. (1,2,3,4,...20) Instead random rank values will be displayed. (2,6,8,16,19,...)
Resolving The Problem
You need to verify that the rank is created first and the filter is applied afterwards. In simple reports this seems to work without any workaround but for more complex reports it might be required to adjust the the order.
Usually you would have a query containing the rank function and the filter applied on rank result.
Steps:
- remove the filter from the query containing the rank
- create a new query and point the "Rank Query" to the new "Filter Query"
- copy the data items from the "Rank Query" to the "Filter Query"
- add the filter on rank to the "Filter Query"
You have to open the query explorer to edit the new query!
Was this topic helpful?
Document Information
Modified date:
28 November 2022
UID
swg21454202