Himani Joshi Posted August 15, 2019 Share Posted August 15, 2019 Hi team, I am trying to write a custom expression in a visualization to find the median. So far, I have written this, but it shows an error. I was hoping you could help me out. Thanks ! case WHEN(UniqueCount([Project-]='Even' THEN[Time (Hours)]=(1/2)*(UniqueCount([Project-])/2)+(UniqueCount([Project-])+1)/2)) WHEN(UniqueCount([Project-]='Odd' THEN [Time (Hours)]= (UniqueCount([Project-])/2) ELSE "NULL" END Link to comment Share on other sites More sharing options...
Gaia Paolini Posted August 16, 2019 Share Posted August 16, 2019 I don't understand what UniqueCount(..)='Even' means. UniqueCount produces a number. In terms of syntax, there is a missing ) before the ='Even' and ='Odd' parts. Can you share what you are expecting to see as results Gaia Link to comment Share on other sites More sharing options...
Himani Joshi Posted August 19, 2019 Author Share Posted August 19, 2019 Hi Gaia, Thank you for your response, uniquecount is number of observations , 'n'. Thank you for pointing out the mistake in syntax , I will fix it right away. Regards, Himani Link to comment Share on other sites More sharing options...
Kirsten Smith (she/her) Posted August 19, 2019 Share Posted August 19, 2019 Did that fix the error If not, please include the error you are getting. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now