Forum Discussion

I_Like_Pi's avatar
I_Like_Pi
Icon for Resolver II rankResolver II
9 years ago

STDDEV error Results to large

I am receiving a strange error. when I try to calculate Standard Deviation I get "The result of a conversion or arithmetic operation is either too large or too small".

I tried to skin this a couple ways. I first tried to do it by building a summary table, i.e.

Sum_FranData = SUMMARIZE(Data,
      Data[Franchise],
      "MerchantCount", DISTINCTCOUNT(Data[Merchant Name]),
      "Tot_FrnSales", [M_TotalSales],
      "Avg_FrnSales", [M_Avg_Sales],

      "SD_FrnSales", STDEV(Data[Sales]))

 

I then stripped the SD calc from the summarize and attempted to add it back by adding a column

SD_FrnSales = STDEVX.P(FILTER(Data,Data[Franchise]=Sum_FranData[Franchise]),Data[Sales]) 

 

In both cases I get the same Result too large error.  I am now going to 2 stage this, keep the SD calc out of the first summary but add a Squared Variance Calculated column to Data then build a second summary of the Average (Squared Variance) rooted. ...  that is what SD is, i think. It appears to work.

 

It appears to work, but I am hoping there is a better way that someone might suggest.

 

 [Edited to fix Spelling, grammer [;)] and clarity. Sadly English is my first language]