Value was either too large or too small for a Decimal.

vpidala
New Contributor II

Dear Team, while opening the cube view, I am experiencing issue " Value was either too large or too small for a Decimal." 

I can see that in BR for EndBal, one of the divided formula causing the issue I am thinking. I am trying to add the divide function, but it is not working. any suggestions on the new formula? 

Existing furmula:

Return api.Data.GetDataCell("VariancePercent(A#AVG_Daily_Sales:T#POV:U8#None,A#AVG_Daily_Sales:T#POVPrior12:S#Actual:U8#None)/100")

 

New furmula:

Return api.Data.GetDataCell("(VariancePercent(Divide(A#AVG_Daily_Sales:T#POV:U8#None,A#AVG_Daily_Sales:T#POVPrior12:S#Actual:U8#None)),100)")

 

 

5 REPLIES 5

aformenti
Contributor

HI @vpidala,

Why you trying to divide by 100 the result of the Variance Percent Formula? It shouldn't be needed, as it is handled by the predefined function. Have you tried removing it?

vpidala
New Contributor II

Thank you Aformenti for quick reply. it is existing formula, it been there for last few years. I removed the divided by 100, still the same issue. how to predefine the dividing? 

Actually, I am guessing that the error is because of this formula. can you please suggest how to back track to find out the exact interaction or calculation that causing this issue.

I am not following. 

The syntax on the new Formula you sent is wrong, you do not need the Divide Function there. Your original formula looks correct:

api.Data.GetDataCell("VariancePercent(A#AVG_Daily_Sales:T#POV:U8#None,A#AVG_Daily_Sales:T#POVPrior12:S#Actual:U8#None)/100")

This is wrong:

api.Data.GetDataCell("(VariancePercent(Divide(A#AVG_Daily_Sales:T#POV:U8#None,A#AVG_Daily_Sales:T#POVPrior12:S#Actual:U8#None)),100)")

The issue you having must be somewhere else, unfortunately without more info its difficult to assess. 

 

 

 

vpidala
New Contributor II

I have cube view with below POV:

cube name: Planning

Flow member: EndBal
Origin memeber: Top
IC Member: Top
UD1: reporting layer
UD2: total dpt
UD3: total prj
UD4 .... UD8: None


while I am opening cube choosing one of the entity hierachy then the issue pops up saying that "" Value was either too large or too small for a Decimal.""

while I was checking the endbal BR then I thought that the issue arrised beacuse of this BR. With this scenario,
what are the possibilities of checking to narrow down the issue?

 

Hi @vpidala,

Could you try with this:

api.Data.GetDataCell("Divide(VariancePercent(A#AVG_Daily_Sales:T#POV:U8#None,A#AVG_Daily_Sales:T#POVPrior12:S#Actual:U8#None),100)")