4 Replies Latest reply on Jan 21, 2016 9:47 AM by Kyle Mills

# Calculation to return a negative percentage

I having a problem with a percentage calculation.

(SUM([Measure_1]))+MAX([Measure_2])         ***This formula is correct

(SUM([Measure_1]))+MAX([Measure_2])*0.40  ***This formula is incorrect

I'm trying to get 40% of the above calculation.  Would like it to return a negative value.

Thanks in advance to anyone who can help!

• ###### 1. Re: Calculation to return a negative percentage

Hello Kyle,

I may be miss-understanding, but if you want it to return as a negative value, you just need to add a negative sign.

- ((SUM([Measure_1]))+MAX([Measure_2])*0.40)

If I am miss-understanding the question, can you provide more detail on what you are trying to accomplish?

Regards,

Rody

1 of 1 people found this helpful
• ###### 2. Re: Calculation to return a negative percentage

Thanks Rody,

I'm trying it a different way b/c I'm still not getting the correct value.

-INT(([Total B4 Tax])*0.40)

I think it's the Aggregation that is causing it to return a value that is way too high.  The expression is an Aggregation so the calculated results are automatically Aggregated.

• ###### 3. Re: Calculation to return a negative percentage

Hello Kyle,

Can you provide a screenshot of your viz, and maybe some examples of the values you expect to see, vs the values you are seeing?

I think I have seen Tableau incorrectly calculate something 1 time, and it was from a very strange bug, for a very particular situation.

If I can see how your viz is setup, and what your expected results are, I can possibly help guide you in the right direction.

Regards,

Rody

1 of 1 people found this helpful
• ###### 4. Re: Calculation to return a negative percentage

Rody,

I finally got it to work.  It was a filter (lack of) problem.  Thanks your help