5 Replies Latest reply on Sep 12, 2018 12:56 AM by Zhouyi Zhang

# growth calculation via LOD not working

Dear Forum,

I have a problem with a calculation of a LOD. I sent the workbook in the attachment, it is about the following problem:

In column 1 the sales figures are from this month, in column two the sales figures from this month, but from the last year.

Between these two time fields now the growth rate is to be calculated, which is calculated by:

Present - Past / Past.

The individual lines are all calculated correctly, but the total sum does not fit. A growth rate of 60.20% is calculated. But it would be correct:

(18.000 - 15.000) / 15.000 = 20%

Can someone explain to me where the mistake lies and exactly what needs to be changed so that the total also calculates a growth of 20%?

• ###### 1. Re: growth calculation via LOD not working

Hi, Eike

Below is the screenshot of result

Hope this helps

ZZ

• ###### 2. Re: growth calculation via LOD not working

Hi Zhouyi,

thanks for that work - but now every Line is 20% ? This is not right. The total sum yes, but not the single lines. For example the first line should be:

(7000 - 5000) / 5000 = 40%

• ###### 3. Re: growth calculation via LOD not working

Hi, eike

See my update. sorry about the confusion.

ZZ

• ###### 4. Re: growth calculation via LOD not working

Thanks for that Zhouyi! Its working.

Could you explain to me, what the SIZE() Function is doing in this Case? Why is it true at 1?

• ###### 5. Re: growth calculation via LOD not working

Hi, Eike

This is a tableau build in function that calculate the size of partition, e.g. as below, the size of detail row is 7, if there is a grand total, the size of the total partition is 1.

In another word, I utilize this feature, apply different calculation when the partition is in total row.

Hope this makes sense.

ZZ