Current power bi service not support custom function and query parameters. I think your issue may related to it.(these parameters not available on power bi service, so your methods get the error or wrong result)
Regards, Xiaoxin Sheng
Community Support Team _ Xiaoxin If this post helps, please consider accept as solution to help other members find it more quickly.