5 Replies Latest reply on Mar 12, 2017 4:10 PM by susheela.hegde

# How to Calculate the grand total dynamically for measure values

Hi,

I am new to tableau and I am working on Cubed data. I cannot copy the workbook because it has propitiatory data.

My requirement is to show  how  each measures perform in bar chart( basically have the measure values and filter the measures accordingly) and calculate grand total of it dynamically. I am stuck in calculating grand total dynamically for measure values. How Can I achieve this?

Or is there any other way to do this? I have say 10 measures, but i want to display 4 and grand total of 4. If i want to see 6, then 6 measures visualization and grand total of 6 measures.

Any help is appreciated.

• ###### 1. Re: How to Calculate the grand total dynamically for measure values

Hi

I am going to attach a t10.1 workbook - don't know what version you are on - you may not be able to open it -

I will walk you through some vies here but I suggest you spend some time with the training videos at Tableau Training and Tutorials

Really a good place to get started:

All the examples use Superstore data that is delivered with you copy of tableau

Below is a most basic text table

See the SHOW ME panel at the right - it is a drop down that can be used at any time to show you how to construct a basic viz

The Text table is just a matrix with dates for columns and the product categories for rows (just drag the the dimension label rows shelf

I added sales by double clicking the Measure SALES and letting it populate the matrix

The Grand Totals are added by going to the analytics tab on the left panel and dragging the TOTAL icon on to the view and dropping it on columns

The view below converted the text table to a stacked bar chart by Opening the Show Me and clicking on the stacked bar

Then to see a side by side bar v years I took the same table and clicked on the side by side bars on the show me

To look at multiple measures I isolate a single year by dragging the order date to the filter and selection 2016 then MEASURE NAMES on columns and double clicked the SALES, PROFIT and QUANTITY measures and added them to the chart

Tableau has a wide range of capabilities that you can use to meet your specific needs -

Have fun practicing and see what works best for you

Let me know if this helped

Jim

1 of 1 people found this helpful
• ###### 2. Re: How to Calculate the grand total dynamically for measure values

Hey Jim,

Thank you very much for your guide. So In the workbook you attached, in Multiple measures for 2016 sheet, you have calculated profit, quantity, sales for 2016 for each category. Now I want to add up profit+quantity+sales and this should be dynamic for 2016 . data I have is Cubed data and not direct from relational database. How can I do this?

I read in tableau that many items in measures can have grand totals but for different measure values, we have to calculate two different sheets (one for measure values viz and another sheet  to add up all measures values (calculated field) as grand totals) and adding these sheets in Dashboard. I can do this. But my grand total isn't dynamic.

so In below screenshot, I can see grand total for the measure values i.e. 13,470,744 (SUM of measure values) but its not displaying Unless I click on Grand total . Is there a way to display grand total or is there a way to display SUM of select measure values in tooptip?

Let me know If i have made myself clear in requirement.

1 of 1 people found this helpful
• ###### 3. Re: How to Calculate the grand total dynamically for measure values

Hi

Sorry but it is very difficult to do anything without being able to see the data we are working with

it sounds like you are going to need some sort of LOD calculation that takes the form {Fixed [Dimension]:sum([measure[)}

But that's only a guess at this time - sse the tutorial that starts with Conceptual Topics with LOD Expressions

Jim

1 of 1 people found this helpful
• ###### 4. Re: How to Calculate the grand total dynamically for measure values

Hi Jim,

No problem.  Thanks a Lot.

Since I am using Cubed Data I can't even use LOD in tableau.

Basically , I am trying to add the measure values dynamically. Below link has my requirement.

As per below Link I tried dashboard but my grand totals isn't dynamic but it is static.

1 of 1 people found this helpful
• ###### 5. Re: How to Calculate the grand total dynamically for measure values

Hi Jim,

I couldn't attach the worksheet in this discussion chain, but created another discussion "how to display Sum of all measure Values in view/Dashboard" and have attached the sample workbook of my requirement.