9 Replies Latest reply on Jan 30, 2019 10:12 AM by Deepak Rai

# Incorrect values of percentage value in subtotals

Hello everyone!

So, I'm facing an issue while calculating the subtotals of percentage values in Tableau. Row wise values are correct, but the values of subtotals, the ones in percentage aren't getting calculated row wise.

Eg.

A
B
C=B/A
362%
5153%
8 (total)21 (total)5% (in correct) -- it should be 21/8=2.625

Have attached sample twbx for reference.

TIA!

• ###### 3. Re: Incorrect values of percentage value in subtotals

How about this.

It's a level of detail calculation to get you the Subtotal per Segment using the calculation that you're looking for.

• ###### 4. Re: Incorrect values of percentage value in subtotals

Hi Deepak,

Thanks for the suggestion!

I tried your solution but it didn't work with the data I'm using. Maybe that's because the two measures I am using are Average and Aggregated. The result is an aggregate value.

The workbook I have shared has sample data of superstore.

• ###### 5. Re: Incorrect values of percentage value in subtotals

Hi Maneesh,

Thanks for the suggestion!

I tried your solution but it didn't work with the data I'm using. Maybe that's because the two measures I am using are Average and Aggregated. The result is an aggregate value.

The workbook I have shared has sample data of superstore.

• ###### 6. Re: Incorrect values of percentage value in subtotals

Thanks for the reply Kyle,

I tried your suggestion in the original data I'm using, didn't work though.

• ###### 7. Re: Incorrect values of percentage value in subtotals

Nancy, are you getting an error with the LOD calculation? Can you give some insight into what's not working with it?

• ###### 8. Re: Incorrect values of percentage value in subtotals

Hi Kyle,

I'm not getting any error by using the logic of LOD in the data I'm working on. The thing is, I'm not getting accurate results while replicating the LOD calculation in my data. However, in Superstore's data, the LOD calculation and Automatic option suggested by Deepak and Maneesh work fine.

Can't figure out why the same calcs aren't working with the concerned data set!

Thanks for the help though!

• ###### 9. Re: Incorrect values of percentage value in subtotals

If you use FIXED LODs , and you have filters, they need to go to CONTEXT