问题描述
我正在 Power BI 中进行 API 调用:
Source = Json.Document(Web.Contents( APIURL & "/commonapi/search?name=myName&eCode=FCD&recordStart=1&recordLimit=1")),Total = Source[results-total]
响应 JSON 是:
我想在变量“总计”中获得结果总计为 152。但是我遇到了错误
Total = Source[results-total]
因为“results-total”在 JSON 中的“responseHeader”中。 Total = Source[results-total] 的正确代码行是什么?
在此先感谢您的帮助
解决方法
得到解决。
Total = Source[resposeHeader][results-total]