I have created a custom Function in Power BI as follow:
let
CallAPI= (
URL as text,
Token as text
) as any =>
let
WebResponse = Web.Contents(URL&"?UIN="&Token)
in
WebResponse
in
CallAPI
And then I try to call the above function in another Query:
let
Source = CallAPI("xyz.test.org.sg/.../getdetails", Paranric)
in
Source
note: Paranric is a parameter
However, I got an Expression error: The name "CallAPI" wasn't recognized. Make sure it's spelled correctly.
----
Anyone can advise what is the problem?
Thanks.