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.
Is there a way to debug within Power Bi Desktop? I am not familiar with M language and would like to manipulate data returned from API call before this is sent to the table but I have no idea what I am doing and what the data look like. I would like to add up some numbers returned from API call and maybe keep only limited the data. Is there something similar to system.out(myVariable) OR console.log(myVariable) so I can see what I am getting returned?
Solved! Go to Solution.
In Power Query you break the transforms into small steps. You can examine the output of each step by selecting it in the "Applied Steps" section.
You can click next to the links in your result tables to see a preview of the data behind them.
You can invoke functions and see their output based on sample parameters you provide.
Power Query allows you to throw errors if you arrive at code junctions you don't expect.
For API calls you can use tools like Postman to test them out before implementing them in Power Query.
Above all - invest time learning M. It is time well spent.
Let's say you have a function that cubes a value.
(val)=> val*val*val
when you click on the query for that function you see its details and parameters
Now you can "test" it by invoking with a sample value.
Thank you for this. I am working now on breaking up larger code into smaller pieces and your response helped me.
In Power Query you break the transforms into small steps. You can examine the output of each step by selecting it in the "Applied Steps" section.
You can click next to the links in your result tables to see a preview of the data behind them.
You can invoke functions and see their output based on sample parameters you provide.
Power Query allows you to throw errors if you arrive at code junctions you don't expect.
For API calls you can use tools like Postman to test them out before implementing them in Power Query.
Above all - invest time learning M. It is time well spent.
@lbendlin wrote:You can invoke functions and see their output based on sample parameters you provide.
How would you invoke the function with sample parameters and see its output? I test my calls in Postman and I can click on the links and see records details once my code is executed. I am used to be able to learn language by doing small steps and seeing outputs either in the browser console or on Windows command prompt
Let's say you have a function that cubes a value.
(val)=> val*val*val
when you click on the query for that function you see its details and parameters
Now you can "test" it by invoking with a sample value.
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.
User | Count |
---|---|
117 | |
104 | |
77 | |
73 | |
52 |
User | Count |
---|---|
145 | |
109 | |
109 | |
90 | |
64 |