Please attach some workbook or data to help you.
sorry, miss the attachment. already updated. thank you.
I see from your screenshot that [Unit Cost] and [Unit Produced] are separate data sources, and you've blended them.
Is it possible for you to put them in the same data source? That's the best option in Tableau. If you do so, your grand totals will work the way you intend automatically.
Grand Totals_v10.5.twbx 18.0 KB
Thank you for your work, Branden.
Actually this worksheet is just an example. the Unit and Unit cost were calculation filed that pulled from 5 databases. So I can not blend them into one data source.
Is any other way to make the total correct?
1 of 1 people found this helpful
Keep in mind that Tableau now supports cross-database joins. So it may still be possible to put those figures into one data set. Here's a good discussion of when to use each approach:
My two cents is: data blending is a pain in the ****, and calcs often don't act the way you expect them to. I avoid it whenever possible.
That said, you can try the Tableau hack for putting a different value on the total line:
if MIN([Product ID]) = MAX([Product ID]) then
SUM([Unit Cost] * [Unit Produced])
WINDOW_SUM(SUM([Unit Cost] * [Unit Produced]))
I don't know whether this will work with your data blending though.
Thank you. these information is really good for me.