3 Replies Latest reply on May 21, 2012 10:01 AM by Jonathan Drummey

# I am currently facing a problem in summing the measures

Hello all!!!

I have been using Tableau for quite some time now. There is a problem that I am currently facing in summing the values from three different tables/data sources. Below is the example of the problem I am facing.

A=a+b+c+d+e+f   (Let us assume: the data source of measures am using to find ‘A’ are from Table1 and Table2)

B=g+h+i+j+k+l+m (Let us assume: the data source of measures am using to find ‘B’ are from Table1 and Table3)

C=A+B

The problem am facing currently is ‘C’ is never equal to (A+B) or (a+b+c+d+e+f+g+h+i+j+k+l+m). If I validate the results of ‘A’ and ‘B’ separately it holds true. But when it look at ‘C’ it is not true. Values of ‘C’ were always lower than actual ‘A+B’. All the measures (‘a’ to ‘m’) I am using for this task are number data types. There is an existing relation between Table1, Table2 and Table3.

I tried couple of options enabled / disabled, but nothings seems working. Any thoughts on this?

• ###### 1. Re: I am currently facing a problem in summing the measures

Hi Kishore,

- Are you using a blend, a multiple tables data connection, or a query that joins the data sources to get the data? In any case, have you validated that you have all rows available to you when you are calculating C? In other words, is your blend/join working as you are expecting? For example, if you are using a blend then you might try finding out how many records are being used in the correct calculation of A in the secondary data source, then in a view using the primary data source see if the you get the same number of records coming from the secondary. If those two numbers aren't equal, then there is something going on with your blend.

- Is A = [a] + [b] + [c] + [d] + ... or is A = SUM([a]) + SUM([b]) + ... In other words, are you summing up at the row level (the former) or summing up at an aggregate level? If you are using data blending, are A, B, and C being calculated within the primary or secondary data sources? There are sometimes idiosyncracies within data blending that can make these calculations a little wonky if your data is at all sparse.

If you could post a packaged workbook with even a few rows of sample data, I'm pretty sure the issue could be figured out.

Jonathan

1 of 1 people found this helpful
• ###### 2. Re: I am currently facing a problem in summing the measures

Hi Jon,

I am using multiple tables data connection to get the data. I have all the rows available when I am calculating C. My join condition is working fine as other parts of the dashboard are validating the results. I validated these points and realized  everything is fine but still it is not working.

But thanks for your second question:

After seeing your second question I realized what mistake am doing. I explored around few numeric functions available and found the solution. Below is what I am currently using to get the C value correct.

C= window_sum (sum(a+b+c+d+e+f)+sum(g+h+i+j+k+l+m)

This function is working fine and now the C values validates to A+B.

Regards,

Kishore.

• ###### 3. Re: I am currently facing a problem in summing the measures

You're welcome, I'm glad you figured it out!