7 Replies Latest reply: Oct 27, 2015 6:40 PM by Viktor Kreschenski

# Get total value in table diagram instead of a total null-value!

Hello Community,

I have a problem with one of my tables and i can't seem to find the solution yet.

Below you can see my table with the total row at the end. Instead of "1751/2000 = 87,55%" it shows me a NULL-Value. How can I fix it? Thanks in advance.

This is my setting for the last column (sorry its in german ):

• ###### Re: Get total value in table diagram instead of a total null-value!

what is the declaration in the third expression?

Regards

• ###### Re: Get total value in table diagram instead of a total null-value!

The declaration is [(worked (h))/(to work (h))]

• ###### Re: Get total value in table diagram instead of a total null-value!

Maybe you used this as expression: alt([worked (h)] /  [to work (h)], 0) to catch possible errors like occuring by division through 0.

- Marcus

• ###### Re: Get total value in table diagram instead of a total null-value!

If you have only one value per project for "worked (h)" and "to work (h)" this expression can work:

[worked (h)]/[to work (h)]

But this will fail in totals row, as it has more than one value for each field.

This expression can work with only one value and for a group of values:

Sum([worked (h)])/Sum([to work (h)])

• ###### Re: Get total value in table diagram instead of a total null-value!

Yes thanks you are right i just used Sum([worked (h)])/([to work (h)]) now i use Sum([worked (h)])/Sum(Distinct [to work (h)]). But now i have a different problem that the total row shows me a wrong percentage (see below). I think maybe its because some projects has the same to work hours so the distinct function calculates something wrong or the NULL-values are doing something crazy.

• ###### Re: Get total value in table diagram instead of a total null-value!

Yes, the distinct in that value can cause issues with the results. Why you need to use distinct?

Maybe is beacuse for each project you have many rows with the same value and only need one, in this case maybe this can work:

Sum([worked (h)])/Sum(Aggr([to work (h)], Projects_FieldName))

• ###### Re: Get total value in table diagram instead of a total null-value!

Thanks Ruben! It works now !!