我正在使用 Power BI Desktop 创建对堆栈溢出 API 的 Web 查询。我想获取从 Power BI 中预填充的用户表中提取的每个用户的堆栈溢出问题的数量。
所以我想要一些看起来像这样的东西:
预填充用户:
- 6231494
- 用户 2
- 用户 3
StackOverflow 问题:
- 6231494:5
- 用户 2:12
- 用户 3:10
这是我在高级编辑器中的网络查询的当前代码:
let
Source = Json.Document(Web.Contents("http://api.stackexchange.com/2.2/users/6231494/answers?order=desc&sort=activity&site=stackoverflow")),
items = Source[items],
#"Converted to Table" = Table.FromList(items, Splitter.SplitByNothing(), null, null, ExtraValues.Error),
#"Expanded Column1" = Table.ExpandRecordColumn(#"Converted to Table", "Column1", {"owner", "is_accepted", "score", "last_activity_date", "creation_date", "answer_id", "question_id"}, {"Column1.owner", "Column1.is_accepted", "Column1.score", "Column1.last_activity_date", "Column1.creation_date", "Column1.answer_id", "Column1.question_id"}),
#"Expanded Column1.owner" = Table.ExpandRecordColumn(#"Expanded Column1", "Column1.owner", {"reputation", "user_id", "user_type", "profile_image", "display_name", "link"}, {"Column1.owner.reputation", "Column1.owner.user_id", "Column1.owner.user_type", "Column1.owner.profile_image", "Column1.owner.display_name", "Column1.owner.link"})
in
#"Expanded Column1.owner"
我基本上需要一种方法来设置当前的硬编码 ID (6231494) 等于我预定义的用户表中的 ID 列表