5 Replies Latest reply on Sep 9, 2018 7:39 AM by Jim Dehner

# Sorting views with table calculations

Dear Community,

I'd like to be able to automatically sort based on values in a view that has table calculations. I've tried using calculated fields, working out the value I want to sort by and using the Rank function, but this doesn't seem to work on my view.

I've attached an example of what I mean. I'd like to be able to auto sort based on the proportion for a specific market.

I've been stuck on this for a while; hopefully someone knows what to do!?

Thanks,

Mitch

• ###### 1. Re: Sorting views with table calculations

Hi, Mitchell

How did you determine which market proportion value is used for sorting?

ZZ

• ###### 2. Re: Sorting views with table calculations

Hi

Not certain that this will produce the result you want but see the attached

I wanted to have a field to sort on so I replaced the table calculation with an LOD to determine the %

Then created a viz

then sort

Jim

If this posts assists in resolving the question, please mark it helpful or as the 'correct answer' if it resolves the question. This will help other users find the same answer/resolution.  Thank you.

• ###### 3. Re: Sorting views with table calculations

Hi Zhouyi,

Thanks for the response. The way I tried to do it was working our proportion in a calculated field (number in one market divided by total number across markets). That works to rank them but not in the view - some sort of conflict with the table calculation!?

Thanks,

Mitch

• ###### 4. Re: Sorting views with table calculations

Thanks Jim, think you have helped me before

This looks like it may work! I'll try it on my data. How does it know which of the 4 markets to sort by?

Thanks,

Mitch

• ###### 5. Re: Sorting views with table calculations

Hi Mitch

It is sorting the Markets based on the Percent Calc - I used an LOD to have a field that could be included in the sort

so it is sorting at the markets based on their total % overall all categories  (you can't use a table calc in the sort field)

Jim

If this posts assists in resolving the question, please mark it helpful or as the 'correct answer' if it resolves the question. This will help other users find the same answer/resolution.  Thank you.