如何将JSON响应转换为Power BI中的表
我是从Web服务中消费一些数据的任务,用于消耗来自Power BI的数据,我将其用作空白查询,稍后我在高级编辑器中添加了以下查询:
let
url = "http://*********",
headers= [#"Content-Type"="application/json"],
postData = Text.ToBinary("{""token"":""*************""}"),
response = Web.Contents(
url,
[
Headers = headers,
Content = postData
]
),
jsonResponse = Json.Document(response)
in
jsonResponse
作为答案,我清楚地获得了一个JSON文件,该文件构成如下:
{'result':'1',
'message':'Successful Operation',
'data':[
{'idActivity':'1001',
'organization':'ABC-001' ,
'date':'6/10/2022 2:34:04 PM',
'lat':'57.3497300',
'lng':'-90.3929000',
'status':'0',
'company':'382',
'tag':'0'},
{'idActivity':'1002',
'organization':'DEF-002',
'date':'6/10/2022 2:21:15 PM',
'lat':'83.6718200',
'lng':'-23.3464000',
'status':'0',
'company':'932',
'tag':'0'}]}
我想知道是否有一种方法可以将此JSON文件转换为表,然后能够在Power BI Visuals中表示信息?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
单击解析JSON按钮。那应该自动解析。您可能需要用双引号(“)替换单个引号
。 “ nofollow noreferrer”>
Click the parse JSON button. That should parse it automatically. You might need to replace your single quotes with double quotes ("). Your sample JSON worked for me using parse JSON when I did that.