-
1. Re: Alternative to RAWSQL_REAL to override filters and create a calculated constant
Tracy RodgersMay 23, 2012 11:31 AM (in response to Chris Ralph)
Hi Chris,
Would a table calculation work for this? Perhaps the following?
total(avg(A))
-Tracy
-
2. Re: Alternative to RAWSQL_REAL to override filters and create a calculated constant
Chris Ralph May 23, 2012 12:17 PM (in response to Tracy Rodgers)Hi Tracy,
Thanks very much for the suggestion.. I tried this, but the TOTAL function doesn't let me override filters. What I'm trying to get is a constant across all the rows in my data that is equal to the average of a calculated variable. When a filter is applied using TOTAL(AVG(A)), where A is my calculated variable, only the filtered rows go into the calculation of the average, but I want all the rows included in the calculation of the average.
I've been trying to figure this out for a week, and I'm starting to suspect this simply can't be done in Tableau. Any other suggestions would be very greatly appreciated!!
Thx!
Chris
-
3. Re: Alternative to RAWSQL_REAL to override filters and create a calculated constant
Alex Kerin May 23, 2012 12:29 PM (in response to Chris Ralph)If you change your filters to table calculation filters, then total will bring back all rows:
-
4. Re: Alternative to RAWSQL_REAL to override filters and create a calculated constant
Alex Kerin May 23, 2012 12:31 PM (in response to Alex Kerin)Another possibility is duplicating the source using custom SQL and a union, but this can get messy if you don't stay on top of the duplicated rows
-
5. Re: Alternative to RAWSQL_REAL to override filters and create a calculated constant
Tracy RodgersJun 8, 2012 12:01 PM (in response to Chris Ralph)
Hi Chris,
Another possibility would be to create a second calculated field after the total(avg(A)) is create that will either 'show' or 'hide' the desired variables. Then, place this calculation on the view, right click on the 'hide' option and select Hide. The table calculation will take all the data into account, however, by hiding it using this other calculation, the user will not see it, and as the data is updated, it will be hidden as well.
-Tracy