Skip to main content

Hi Community,

 

I have created ratio which is merely division of two measures. It works perfectly fine in one workbook

 

Calculated Field Format Issue

 

The values in third column are computed as [Metric Canspam WDW] / [Metric Delivered] and displayed as Percentage with 3 float values.

 

Now, I have another workbook that is identical, although deals with bigger numbers:

 

pastedImage_1.png

 

As you can see, the Canspam Ratio WDW is totally incorrect!? Why?

Is this related to data type of measures involved? Can that be adjusted somewhere in settings etc?

 

What I expect to see is for code 9759, canspam ratio WDW should equal to 0.011599%

What am I missing?

 

Thanks for your feedback!

 

Dhanashree

3 answers
  1. Mar 31, 2016, 7:04 PM

    Howdy,

     

    This is mostly likely going to be an issue with aggregations. Lets use this excel table for example:

     

    Value1Value2% Ratio101283%51050%2010020%105020%

    173%

    This is how you are querying Tableau. You're saying divide Value 2 by Value 1 and then sum it all up. Its easier to think about in excel because you see everything in front of you whereas Tableau this occurs behind the scenes.  So just as in algebra and old maths we have to concern ourselves with the order of operations. You would SUM of all Value 1 and SUM all of Value 2 first.

    So this query 'properly written' in tableau is SUM([Value1]) / SUM([Value2]) And you'd get the proper ratio of 45 / 172 or 26%

     

    Cheers!

    Carl Slifer

    InterWorks

0/9000