3 Replies Latest reply on Jun 18, 2019 5:07 AM by Paul Wachtler

Behaviour of LOD calculations

Hi there!

I already read all the info about LODs and filted, just like some of you suggest. Now I have the next questions:

For the following data: I defined the calc. field: I read that in this way: "for each R, calculate the avg(Nota)".

In respect of the calculated fields, I suppost that Tableau create a new column and fill every row of it with the value for taht calculated field, right?

Tableau already have all the information that it need for calculate the new 'NOS' field.

But when i see the data, I see and I expected this question 1: why does that happen?

On the other hand, I also created the next LOD: question 2: how can I understand the logic hen the is not any field between FIXED and ":"?

In this case, when I see the table viz, I see that Table take the avg(nota) value for every "R" and calculate the indicated percentile, but Tableau is not using every row's value. Tableau is just taking the list of the table viz: question 3: Why is that happening?

And finally (followeing the same idea): For each R I expected taht the table indicate the value N*NPS, where N is the number of rows for each "R" and the viz indicate SUM(NPS).

question 4: What I am misunderstanding?

Would you please help me with this? I think its very important just to understant how Tableau operates this the fields.

regards,

José

• 1. Re: Behaviour of LOD calculations

Hi Jose,

For your first question, the LOD calculates in the viz, based on the detail that is included.  You can't see the LOD in the data connection screen because it calculates after that.  Your NPS calculation works in the viz though.

2 - When you don't put anything after the FIXED, it fixes your calculation at the highest level of the viz.  So it will calculate at the highest level, and not consider any fields in your viz, unless you have context filters in place.

3 - Your NPS calculation is taking the average of the three rows where R = 1.  When you take the average of the three Nota values for R=1 it comes out to .44

4 - Again, your NPS calculation is calculating an average at the level of detail of R.  It takes the average of each value within each R and that's what it's showing.

Best,

Paul

• 2. Re: Behaviour of LOD calculations

Dear Paul Wachtler

Thanks for aswer my questions. About what you said before:

3 - Your NPS calculation is taking the average of the three rows where R = 1.  When you take the average of the three Nota values for R=1 it comes out to .44

But the screen says SUM(NPS) (not AVG(NPS)). So I expect the SUM of the tree NPS and no the AVG as you said. Would you clarify this idea?

José

• 3. Re: Behaviour of LOD calculations

Hi Jose,

Your NPS calculation itself contains the average calculation:

{FIXED [R]: AVG([Nota])}

This is fixing the level of detail at each R, and taking the average of the Nota values.  Once this NPS calculation is complete, you then only have 1 value for each R.  So think of it like this, after your LOD your table looks like it does right now.  Putting the sum (or any aggregation) on your NPS calculation doesn't do anything.

For example, if you have one row and that row only has a value of 3 - if you take the sum, or avg of 3, since it's a singular value, it's still going to return 3.  That's what's happening in your LOD.  Each R value has only one value for NPS so the sum doesn't do anything.

Paul

1 of 1 people found this helpful