Can we apply rank function on Calculated field. Example we have a sum of multiple measure and then i want apply a rank function on that.
hI @jhasa
Welcome to QuickSight Community. It is very much possible to apply a Rank on aggregated data.
You can refer to the documentation here
Regards,
Giri
suppose we have a calculation like this “Rank({Operations}+{Safety}+{Voice of Customers})” will this work or do we have any alternative solution for this requirement.
Hi @jhasa
In theory it will work
“One or more aggregated measures”
rank([sum({Operations}+{Safety}+{Voice of Customers}) DESC])
Its always more complicated as A+B.
Can you create a new field, where you do the A+B and use the new field in the rank?
We cannot create a new field in the table. All the measure i have shown in the calculation is based on condition, so this not possible to create a new field.
you should be able to do
new_field = {Transport}+{Safety}+{Compliance}+{Voice}
rank_field = rank(new_field)
if thats also not working i would try to calculate 4 different rank, sum the ranks and divided by 4
These are not a field “{Transport}+{Safety}+{Compliance}+{Voice}” all are measure and i want to sum each measure together and then i want to apply rank function.
“if thats also not working i would try to calculate 4 different rank, sum the ranks and divided by 4”
what 4 here ? in my case all rank are summed and if i divide it by 4, i am not getting a separate rank for individual vendor
Hi @jhasa
You have run into a technical issue. The nested Aggregation error needs a little bit of deep dive.
Please review the article below to understand where your calculation may be breaking.
What @ErikG is saying is right. First try the rank on a simple case with one field so you can resolve the Nesting error. Once you have resolve the issue it is easy to extend it to bring all your calcuations in since they will all be similar in nature.
Regatrds
Giri
Hi @jhasa,
It’s been awhile since we last heard from you, did you have any additional questions regarding your initial post?
If we do not hear back within the next 3 business days, I’ll close out this topic.
Thank you!
Hi @jhasa,
Since we haven’t heard back, I’ll go ahead and close out this topic. However, if you have any additional questions, feel free to create a new post in the community and link this discussion for relevant information if needed.
Thank you!