Numeric Parameter - No Decimals?

Jason Kaczmarek shared this question 5 years ago
Answered

The numeric parameter does not hold decimals. Is this by design? For example, I created a report with a numeric parameter and put in 50.56, but the SQL generated shows 51. (v7.4.6)

Jason

Replies (3)

photo
1

Hi Jason,

if I have Decimal Places set to 2 in either my view or report then I don't get the rounding that you are getting:

/1SBBoAAAC43RBoAAAAIPQQaAAAACD0EGgAAAAg9BBoAAAAIPQuEGj+P+lnAknER9JvAAAAAElFTkSuQmCC

/BymxOKm2j0LoAAAAAElFTkSuQmCC

however, when I set the Decimal Places to 0 then I get exactly as you've described:


so with that in mind, could you please check how you've got Decimal Places configured in both your report and view.

regards,

David

photo
1

David,

I don't see a Decimal Places option on the parameter itself; however, the calculated field I used to reference it does. I verified it was set to 2 decimal places. So that didn't solve my issue.

What I did find out is that the behavior of the parameter depends on the default value. My default was set to 0. When I changed the default to 0.00, then it recognized the decimals. Not intuitive, but I get it now.

Jason

photo
1

Hi Jason,

ah that makes sense! I had put a default value of 12.34 and that's why I couldn't replicate the issue.

I agree with you that it's not intuitive, obviously Yellowfin is choosing int or float according to what the default value is, so I think we should put a note about that in the relevant wiki article - I'll let our technical writer know about this.

Thanks for sharing your information with the Yellowfin Community!

regards,

David

Leave a Comment
 
Attach a file