Forum Discussion
Decimal Parameters in User Defined functions (UDF)
- 1 month ago
Hi ZvikaBK2801,
Thank you for reaching out to Microsoft Fabric Community.
Thank you avinash_7995 for the prompt response.
This is expected. In a DAX UDF, the decimal type is a fixed decimal (currency) type that only keeps 4 decimal places, so 0.0045 / 230 rounds to 0.
For calculations that require more than 4 decimal places, use the Double type instead, as it is designed for higher precision values.
Thanks and regards,
Anjan Kumar Chippa
- 1 month ago
Hi, yes the solution had been provided thanks. I'm now using Double for all my non integer UDF parameters. I also notified the couple PBI local user groups about this issue.
Hi ZvikaBK2801,
As we haven’t heard back from you, we wanted to kindly follow up to check if the solution I have provided for the issue worked? or let us know if you need any further assistance.
Thanks and regards,
Anjan Kumar Chippa
Hi, yes the solution had been provided thanks. I'm now using Double for all my non integer UDF parameters. I also notified the couple PBI local user groups about this issue.
- v-achippa1 month agoCommunity Support
Hi ZvikaBK2801,
Thank you for the response and confirming your issue has been resolved now. Thank you for being part of Microsoft Fabric Community.
Thanks and regards,
Anjan Kumar Chippa