7 Replies Latest reply on Apr 10, 2014 2:13 AM by venkat amalla

How to calculate Logical Sub Totals

Hi Friends,

I need some suggestion regarding: How to calculate Logical Sub totals?

I have created a sample worksheet with Employee data having Emp Name ,Department and Salary. Please find the attached twbx file for your reference. In the attachment you can find two sheets namely: Using Sub totals and With Index, in the first sheet i have calculated the subtotals for individual departments which was quite straight forward.In the second sheet i have created an Index calculated field and tried to display the department name for all the employees.I tried to calculate the Sub totals but it is displaying for every individual record,but i need the sub total for each department as in the first sheet. How to achieve this ?

My out put should as shown in the below image:

• 1. Re: How to calculate Logical Sub Totals

Hi,

Go to Analysis--->Totals---->Add All Sub totals

Then Go to Totals and Then Right click To select the Format menu

Then Change Label of "Totals" to "Sub Totals" .

Please put Measure Names in Filter and Index ,Salary in Measure Values then apply total and format it accordingly, Se if it works for you!!!!

Thanks

• 2. Re: How to calculate Logical Sub Totals

Hi Sumeet,

In my original post i have displayed one image which shows my desired output. But with your solution i can find the subtotal for each record as shown in the below image.

• 3. Re: How to calculate Logical Sub Totals

Please Refer to the file attached may be you find it suitable.

Thanks & Regards

• 4. Re: How to calculate Logical Sub Totals

Sumeet,

My output in Tableau should like below screen shot:

• 5. Re: How to calculate Logical Sub Totals

Hi Phanindra,

Can you check attached workbook? I think it fulfill your requirement

• 6. Re: How to calculate Logical Sub Totals

HI Venkat,

The solution is Ok, but if there are more Dimension fields then ,is it a good approach ?

Can you suggest the BEST way for me.

Many Thanks.

• 7. Re: How to calculate Logical Sub Totals

Hi Phanindra,

As par as i know this is only workaround is there for your requirement. I hope this works same for multiple dimensions. If it not works then please share original workbook or mocked up workbook for your actual requirement.