Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hi,
I have created a function to call Activity events REST api to get user activity for the last 30 days. FOe Bearer Access token i have created another function. Here is the code -
Get Access Token
Function is working fine and generating bearer access token as shown
Now to get User Activity data using Activity events api i have created a list of dates and two custom columns for startdate and enddate as
Now i have created another function GetActivity to call REST API as -
Now i am adding a custom column in a query to generate the list of user activity data by making a call of this custom function as
In the above snap it is clear that Get Activity function is calling Get Access token function inside to get the Bearer access token and it is picking up the startdate and enddate from the columns defined above , Noiw it should a list activity as shown -
But in my case it is showing this error -
Can anyone help my out to resolve this . I am following Bi Elite video to crteate an admin panel -
This is the link of video
https://www.youtube.com/watch?v=Z4E2jSZ4r6A&list=PLL-WSn9hvefogtxxi7CJhjLCJvrDY0mpQ&index=4
and this is the link of the M code -
https://bielite.com/blog/building-a-power-bi-admin-report/
Thanks in advance
Solved! Go to Solution.
The only difference I can see is in your Get Activity Function
token = Source(continuationToken),
which should be
token = Source[continuationToken],
The only difference I can see is in your Get Activity Function
token = Source(continuationToken),
which should be
token = Source[continuationToken],
Hi @Vera_33 ,
You are right. That was a silly mistake and now eveything is working fine. You are like an angel for me. Thanks a lot sister 🙂
Good practice to type out instead of copy paste all the M code, for the naming of custom function, my personal habit is to prefix with "fx" or "fn", and no space, so it is easier to debug...
Thanks 😊
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.