Cannot convert numeric parameter to % to use on metric

Zack Wilson shared this problem 21 months ago
Resolved

Hello.

When I go to convert (or use in calculated field conversion), I get a divide by zero error (in the logs) or a group by error on the report. I am not sure why I would not be able to use this as a number and divide it by 100 ( (1 + (<parameter> / 100) ).


Any assistance in this would be appreciated!


Thanks,

Zack

Replies (4)

photo
1

Hi Zack,

Thanks for reaching out. Could you provide screenshots or replication instructions in this case?

Thanks,

Eric

photo
1

Hey Eric!

I apparently figured it out by accident....

I just had to wrap the calculation in a SUM.

/0ce25f3e8b756cf9674c1fb2b2ad23b8


Or, it decided to just randomly work.... I spent most of the afternoon trying to make this work.


Thanks anyway!


-Zack

photo
1

Hi Zack,

Thanks for the reply, glad to hear another workaround has been discovered in this program!

That does seem a little odd that you'd need a a SUM here though to get a "non-zero" value... maybe its something like a field type thing.

The OTHER thing I just thought of... sometimes you can bypass the validation of the calculated field -

If Auto Detect is selected, then the system will determine the nature of the result field itself. However, if a data type is specified by the user (eg, Numeric, text, etc) then the system will not perform a validation check upon saving the calculated field.

Combined with that, I know some clients turn off the calculated field validation... but it only works for editing, it always tries to validate on creation / 1st save. You can "trick it" by just entering something like 1 the first time.

https://community.yellowfinbi.com/knowledge-base/article/turn-off-validation-of-calculated-fields-when-saving

Do you remember enabling this feature at one time? You can check the table for the entry if not. If this is enabled, maybe you "tricked" it and testing and it could still "broken," just not giving you the error haha!

Debug or SQL Server logs may yield more clues as to what's getting divided by zero with this calculation... maybe a null in mfreight or multiplier fields. Let me know if this adds up at all. Otherwise feel welcome to close if you're over this :)


Thanks,

Eric

photo
1

Hi Zack,


I'm going to go ahead and mark this ticket as Completed due to inactivity at this time. Feel welcome to reach out in the future.

Thanks,

Eric

Leave a Comment
 
Attach a file