Conditional Sorting of Filtered Table


I’m sure there is a way to do this but I have been searching and pulling my hair out over this.

I have a selection dropdown with values, say “A,B,C”

How do I sort my filtered table by different columns depending on the selection.

For example if “A” is selected I would like to sort my table by the “Time” column in descending order, and if “B” is selected I would like to sort my table by “Output” column in ascending order.

Any help would be appreciated.

Thank you

Hey there!

Theres some great resources out in the community about this topic. Here’s one of them I posted a while back! Feel free to reach back out with any questions:

Thank you for this. Got it working using the information in that post.

For anyone coming across this post below are the steps:

  1. Because I needed the sort order to be acsending (time) for one value and descending for the other (Ouput) I needed to invert one value. I did this by creating a new column equal to my time column but made the format “Number” not time and called it “Time Inverted”
  2. I then multiplied the new time number by -1 to invert the values.
  3. Made another new column with he formula If([Selection Choice] = “A”, [Time Inverted], [Output]. This formula would populate the entire column with either the time or the output depending on which Choice was selected. I called this column Time/Output
  4. Then simply added a sort to my table based on the Time/Ouput column. And because the time is inverted the sort ascended on time, and descended on Output.

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.