3 Replies Latest reply on Feb 17, 2020 3:15 AM by Elvira Miró

Sum of averages not using LODs

Hi all,

I am using the average of variable X as a text mark in a table graph (as I only want to keep the month values for this variable). In the view, I have other variables that are not duplicated but single values for the same month (they don't have the same aggregation) and come from a different source, thus I cannot use LOD calculations. I want to have the total as the sum of AVG(X), but coming from blended data, I cannot do it simply by clicking on the total (e.g. http://www.tableausoftware.com/new-features/two-pass-totals). Is there any kind of Table Calculation to do it the elegant way? I have tried WINDOW_SUM(AVG(X) but it doesn't work either (gives me the average of all rows).

Thanks in advance,

 X Date 1 31/01/2018 1 28/02/2018 1 31/03/2018 1 30/04/2018 1 31/05/2018 1 30/06/2018 1 31/07/2018 1 31/08/2018 1 30/09/2018 1 31/10/2018 1 30/11/2018 1 31/12/2018 7 31/01/2018 7 28/02/2018 7 31/03/2018 7 30/04/2018 7 31/05/2018 7 30/06/2018 7 31/07/2018 7 31/08/2018 7 30/09/2018 7 31/10/2018 7 30/11/2018 7 31/12/2018 9 31/01/2018 9 28/02/2018 9 31/03/2018 9 30/04/2018 9 31/05/2018 9 30/06/2018 9 31/07/2018 9 31/08/2018 9 30/09/2018 9 31/10/2018 9 30/11/2018 9 31/12/2018
• 1. Re: Sum of averages not using LODs

Hey Elvira,

Is there a sample workbook that you can attach?

Regards,Rohit

• 2. Re: Sum of averages not using LODs

Will this work? Used X as Measure and as Dimension too.

Thanks

Deepak

If it Helps, PL Mark it Helpful and CORRECT to Close Thread

• 3. Re: Sum of averages not using LODs

Hi Deepak,

No, this option of selecting how totals are calculated directly does not appear in my case because variable X includes data from blended sources. I cannot attach a copy of my original data as it is confidential. However, I can give you any clarification you need. I kinda new to Tableau and thus I cannot think of any solution about this issue, as when I apply AVG function to the totals of X it does the avg of the sum of the elements, and I want the sum of monthly averages (cannot use LODs though in order to keep the rest of the view).

Thank you,

Elvira