Hello,
I am trying to sort a table by two columns. First, in ascending order by the "Tentative Timeline" column and, second, in descending order by "Priority Level."
We are using the status macro for the values in the "Priority Level" column, but I have adjusted the query to only ORDER BY "Priority Level" and that by itself worked, so there are not issues with the macro recognizing the values. The issue seems to be with the CASE statement, but I have tried slight adjustments multiple times and simply cannot figure it out. Can anyone help me figure out what I am doing wrong?
SELECT * FROM T*
ORDER BY 'Tentative Timeline' ASC,
CASE
WHEN ('Priority Level' = 'High') THEN 1
WHEN ('Priority Level' = 'Medium') THEN 2
WHEN ('Priority Level' = 'Low') THEN 3
ELSE 4
END DESC;
My team helped me figure it out! The "Priority Level" values are case sensitive! We changed it to "HIGH" for example and it WORKED!! Yay!
Shoutout to your awesome team at this point! :D
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.