We've captured the moments from FabCon & SQLCon that everyone is talking about, and we are bringing them to the community, live and on-demand. Starts on April 14th. Register now
Still new to power bi and it truly is a powerful tool. I'm running into one road block with my power query. The only way I've been able to make a proper POST API call to retreive data is by putting the Content of the Web.Contents body in a type of script block. This places quotes around the entire block for values to be taken as writen, but does not allow for they use of variables or parameters inside.
Example in the screenshot works perfect, but I need to be able to use parameters preferably that way values can be changed for the same call. works like a charm
would like to use variables or parameters for dynamic values
The last screenshot, I've tried variables of different types and even parameters, but they break the syntax.
Any help is greatly appreciated.
Solved! Go to Solution.
Hi @papi0506
Try concatenating the string pieces rather than having everything in one string. Place the following M code in a blank query to see an example
let
#"tryagain" = "GetInThere",
BodyContent_= "{ ""password"" : " & #"tryagain" & " }"
in
BodyContent_
|
|
Please accept the solution when done and consider giving a thumbs up if posts are helpful. Contact me privately for support with any larger-scale BI needs, tutoring, etc. |
Hi @papi0506
Try concatenating the string pieces rather than having everything in one string. Place the following M code in a blank query to see an example
let
#"tryagain" = "GetInThere",
BodyContent_= "{ ""password"" : " & #"tryagain" & " }"
in
BodyContent_
|
|
Please accept the solution when done and consider giving a thumbs up if posts are helpful. Contact me privately for support with any larger-scale BI needs, tutoring, etc. |
Hey @AlB,
Thank you so much, your suggestion worked like a charm. I had been looking for the proper syntax to all concatening strings together. This was exactly what I was looking for.
Can you paste the query as text in this post so that experts can work on your query?
I'll keep that in mind for next time. AIB's suggestion worked perfectly and I can even use it with parameters now {yeaaaa}. Thank you very much tho.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
| User | Count |
|---|---|
| 6 | |
| 4 | |
| 3 | |
| 2 | |
| 2 |
| User | Count |
|---|---|
| 11 | |
| 10 | |
| 7 | |
| 7 | |
| 6 |