-
1. Re: a field must be aggregate or constant tableau table calculation error
Chris McClellan
Jun 17, 2019 1:52 PM
(in response to Ishita Ishita)
Without being able to see your data, I'd suggest that you can't put an LOD (the FIXED statement) in a table calculation (the RANK_PERCENTILE function)
-
2. Re: a field must be aggregate or constant tableau table calculation error
Paul Wachtler Jun 17, 2019 6:39 PM (in response to Ishita Ishita)Hi Ishita,
I think the error is saying that the fields you use in the table calcs must be aggregate. Even though you have the sum calcs inside your LODs, the LODs themselves are not aggregate.
Try this:
RANK_PERCENTILE(sum({FIXED [Status]:sum([measure])}))<=0.75 and RANK_PERCENTILE(sum({fixed [Status]:sum([measure])}))>=0.25
Let me know if that works for you.
Best,
Paul
-
3. Re: a field must be aggregate or constant tableau table calculation error
Ishita Ishita Jun 19, 2019 7:57 AM (in response to Chris McClellan)Hi Chris
Thank you for your response, I have attached a sample of how the data looks like. I am trying to calculate the quartiles for each status, any help would be deeply appreciated.
Thanks!
-
4. Re: a field must be aggregate or constant tableau table calculation error
Ishita Ishita Jun 19, 2019 7:57 AM (in response to Paul Wachtler)Hi Paul
Thank you for your response, I have attached a sample of how the data looks like.
I tried the calculation shared by you, but unfortunately it didnt work, any further help would be deeply appreciated.
Thanks!
-
5. Re: a field must be aggregate or constant tableau table calculation error
Paul Wachtler Jun 19, 2019 8:04 AM (in response to Ishita Ishita)Hi Ishita,
When you say that the calculation didn't work, did it not give you what you expected or did it give you an error? Can you share a screenshot of it? Also, can you share your tableau file too so we can see what that looks like?
Thanks,
Paul
-
6. Re: a field must be aggregate or constant tableau table calculation error
Ishita Ishita Jun 19, 2019 11:21 AM (in response to Paul Wachtler)Hi Paul,
I am not getting any error.
However, if I am using the calculation shared to identify the data points b/w Q1 and Q3, I am not getting the correct results. In the attached workbook, I have created a box plot for each status, and I have added the calculation shared to identify whether a data point falls between Q1 and Q3 for that status.Kindly let me know if you are able to identify the error I might be making here.
Thanks!
-
Quartile.twbx 19.5 KB
-
Quartile.xlsx 13.3 KB
-
-
7. Re: a field must be aggregate or constant tableau table calculation error
Paul Wachtler Jun 19, 2019 11:36 AM (in response to Ishita Ishita)Hi Ishita,
Thanks for attaching your workbook. I don't think you need the LOD part of the calculation at all.
I believe I got it working the way you want in the attached workbook. Here's the updated P25 to P75 calculation:
RANK_PERCENTILE(sum([Measure]))<=0.75 and RANK_PERCENTILE(sum([Measure]))>=0.25
Then you have to make sure to select Compute Using > Cell so that it computes the percentiles within each column.
Here's what it looks like in the updated workbook
Let me know if you have any questions.
Best,
Paul
-
Quartile - updated.twbx 36.8 KB
-
-
8. Re: a field must be aggregate or constant tableau table calculation error
Ishita Ishita Jun 19, 2019 11:52 AM (in response to Paul Wachtler)Hi Paul,
Thank you so much for your response, this is working for me!
Regards,
Ishita
-
9. Re: a field must be aggregate or constant tableau table calculation error
Paul Wachtler Jun 19, 2019 11:54 AM (in response to Ishita Ishita)Awesome, glad it works! Happy to help!
