-
1. Re: Calculated Field not totaling
Seth Gundy Sep 12, 2014 8:16 AM (in response to David Fateman)In the extract provided, a,b, and d are all strings. The first step is to turn them into numbers.
-
2. Re: Calculated Field not totaling
caitlin.donaldson Sep 12, 2014 8:20 AM (in response to David Fateman)Any possibility of posting a Tableau workbook (TWBX)? That way we can see how you have the calculation setup. I am able to add [a], [b], and [c], but it would be helpful to see how your variables are setup (are they set as measures or dimensions?) and how you are displaying the calculation.
-
3. Re: Calculated Field not totaling
David Fateman Sep 12, 2014 8:25 AM (in response to David Fateman)Change calc to SUM([a])+SUM([b])+SUM([c]) and it summed properly but why do i need to include SUM?
-
4. Re: Calculated Field not totaling
caitlin.donaldson Sep 12, 2014 8:30 AM (in response to David Fateman)How are your variables setup in your workbook? Are they set as measures or dimensions? You shouldn't have to put in the SUMs into your calculation. You should only need to do that if you are mixing aggregated and non-aggregated variables into one calculation. Can you possibly post a screenshot of what you are looking at in your workbook? Might help to solve what is going on.
-
5. Re: Calculated Field not totaling
David Fateman Sep 12, 2014 8:35 AM (in response to caitlin.donaldson) -
6. Re: Calculated Field not totaling
caitlin.donaldson Sep 12, 2014 8:44 AM (in response to David Fateman)Looking at the data I'm seeing what the problem is. [a]+[b]+[c] is going through each row of data and summing these three numbers (so summing up row 1, then summing up what's on row 2, etc leading to summing the column). If one of the numbers (either [a], [b], or [c]) equals null, then the total for [a]+[b]+[c] is being set equal to null. When you add the SUMs before each variable, it tells Tableau to sum all of [a], then sum all of [b], then sum all of [c], and find out what these three added together equals instead of calculating the equation on a line by line basis. If those nulls were instead equal to 0, I believe just typing in [a]+[b]+[c] would work. Right click on "Sheet1 (Test.xlsx)" and click "View Data" to see what the summing looks like on a row by row basis. Hopefully this makes sense! If not, let me know.
-
7. Re: Calculated Field not totaling
David Fateman Sep 12, 2014 8:45 AM (in response to caitlin.donaldson)thanks so much Catilin!!!
-
8. Re: Calculated Field not totaling
caitlin.donaldson Sep 12, 2014 8:46 AM (in response to David Fateman)No problem, glad I could help!