Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Vote for your favorite vizzies from the Power BI Dataviz World Championship submissions. Vote now!
Hi all!
Have POST request:
let
data = Json.FromValue([StatisticsSessionId=paramStatisticsSessionId]),
headers = [#"accept"="*/*", #"ScoutAuthorization"=paramAuthorizationId, #"Content-Type"="application/json"],
web = Web.Contents("http://spic.scout365.ru:8081/spic/AnalogSensor/rest/GetStatistics", [ Content = data, Headers = headers, ManualStatusHandling = {404, 400}]),
result = Json.Document(web)
in
result
Column Value.1 shows result (status) of execution query. If query fulfilled we get "Ok" answer. If query be in progress we get "Processing" answer.
How can i write expression:
IF (Value.1 = "Ok", then get answer, IF (Value.1 = "Procesing", wait "Ok" answer duration 1 min, error ) )?
OR make timeout to get last answer duration 1 min?
Request answer:
Solved! Go to Solution.
Solution:
GetStatistics = Table.AddColumn(StartBuild, "GetStatistics", each Function.InvokeAfter(()=>fnTrackPeriodsMileage_GetStatistics([SessionId], [StatisticsSessionId]), #duration(0,0,0,15))),
@Bessonnizza , power query is case sensitive . Try like
if [Value.1] = "Ok", then "A" else if [Value.1] = "Procesing" then "Ok" else "Error"
@amitchandak thx for reply, but i think you not understand me. I need not to replace "Processing" to "Ok", query should wait answer "Ok" (for example wait 1 min) in colomn Value.1, and then execute.
Now the request is being executed when get first answer, it can be "Ok" (data download), or it can be "Processing" (data is loaded). So i need to wait when query return me definite answer - "Ok" and only then download another colums with data (as shown in the screenshot above).
update
new example
Solution:
GetStatistics = Table.AddColumn(StartBuild, "GetStatistics", each Function.InvokeAfter(()=>fnTrackPeriodsMileage_GetStatistics([SessionId], [StatisticsSessionId]), #duration(0,0,0,15))),
Vote for your favorite vizzies from the Power BI World Championship submissions!
If you love stickers, then you will definitely want to check out our Community Sticker Challenge!
Check out the January 2026 Power BI update to learn about new features.
| User | Count |
|---|---|
| 12 | |
| 11 | |
| 7 | |
| 7 | |
| 6 |