Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
camilo
Contributor III
Contributor III

Chart not adding correctly

Hi,

I did a table where I´m using the following expression:

=sum(distinct(Kg*Multiplicador))

But the partial sum filed does not add the numbers correctly it should say 4.636 but is showing 4.488:

error loading image

How can I post a box with a qvw example in this topic, I´ve seen that on several topics.

Thanks

1 Solution

Accepted Solutions
Not applicable

In Pivot table, the total is usually the expression total and not the total of the row. This works fine till you use something like distinct which at each row level would be diffirent than at the total level.

You need to use the aggr function to achieve the total of the rows.

=Sum( aggr(sum(distinct(Kg*Multiplicador)),Embalaje,Calibre,Embalaje_Eq,Calibre_Eq))

Nimish

View solution in original post

4 Replies
Not applicable

The option to 'attach' is at the top of the page where you write your posts, under the 'options' tab.

camilo
Contributor III
Contributor III
Author

Thank you very much, here is the model with the chart.

Any help is more than welcome!

Not applicable

In Pivot table, the total is usually the expression total and not the total of the row. This works fine till you use something like distinct which at each row level would be diffirent than at the total level.

You need to use the aggr function to achieve the total of the rows.

=Sum( aggr(sum(distinct(Kg*Multiplicador)),Embalaje,Calibre,Embalaje_Eq,Calibre_Eq))

Nimish

camilo
Contributor III
Contributor III
Author

Thank you very much Nimish it worked perfect Big Smile