![]() There’s no way to have the two-pass totals stay as the SUM() for the Row Grand total and Average for the Column Grand Total, so we need to build our own custom grand total. ![]() ![]() In the Columns the total is again based on the SUM(Sales) for each Priority, Ship Mode & Department, then averaged per Priority: When we turn on two-pass totals to do the average, in the Rows that is the SUM(Sales) for each Order Priority, Ship Mode, & Department then averaged per Ship Mode & Department. For the Columns, this is the SUM(Sales) for each Order Priority. For the Rows, this is the SUM(Sales) for each Ship Mode & Department. The default aggregation for the Grand Total is “Total using Automatic”, which aggregates at a higher level. With SUM(Sales) as the aggregate measure, we can turn on Grand Totals for Rows and Columns. The Problem or, Why We Have to Use a Custom Grand Total I’m going to use Superstore Sales, with Ship Mode & Department on Rows, and Order Priority on Columns: We’ve got at least a couple of different solutions for this problem, in this post I’ll demonstrate one solution with table calculations that will work with any recent version of Tableau and another with Level of Detail expressions that will work in version 9 onwards. The user asked how to have the Grand Total show a Sum of the measure for the rows and the Average of the measure on Columns, like so: Here’s a how-to based on a recent request in the comments from my earliest custom Grand Totals post.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |