Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
I Am also trying a similar scneario where i want to get output of API as a column in a new table.
let Source = Table.SelectColumns(#"Sub Tasks",{"JIRAID"}), WorklogUrl = "https://jira.company.com/rest/api/2/issue/", GetJson = (Url) => let RawData = Web.Contents(Url), Json = Json.Document(RawData) in Json, GetWorklog = (JIRAID as text) => let Url = WorklogUrl & [JIRAID] & "/worklog", Json = GetJson(Url), WorkLog = Json[#"worklogs"] in WorkLog, JiraWorklog = Table.AddColumn(GetWorklog, "Worklog", each GetWorklog() ) in JiraWorklog
But i get this error at last step
Expression.Error: We cannot convert a value of type Function to type Table. Details: Value=[Function] Type=[Type]
Solved! Go to Solution.
Hi @Anonymous ,
You could try the following query.
let Source = Table.SelectColumns(#"Sub Tasks",{"JIRAID"}), WorklogUrl = "https://jira.company.com/rest/api/2/issue/", GetJson = (Url) => let RawData = Web.Contents(Url), Json = Json.Document(RawData) in Json, GetWorklog = (JIRAID as text) => let Url = WorklogUrl & [JIRAID] & "/worklog", Json = GetJson(Url), WorkLog = Json[#"worklogs"] in WorkLog, JiraWorklog = Table.AddColumn(Source, "Worklog", each GetWorklog() ) in JiraWorklog
If it doesn't work, you could refer to this case: https://community.powerbi.com/t5/Desktop/New-user-add-custom-column-that-queries-data-from-Web-Content/m-p/788623
Hi @Anonymous ,
You could try the following query.
let Source = Table.SelectColumns(#"Sub Tasks",{"JIRAID"}), WorklogUrl = "https://jira.company.com/rest/api/2/issue/", GetJson = (Url) => let RawData = Web.Contents(Url), Json = Json.Document(RawData) in Json, GetWorklog = (JIRAID as text) => let Url = WorklogUrl & [JIRAID] & "/worklog", Json = GetJson(Url), WorkLog = Json[#"worklogs"] in WorkLog, JiraWorklog = Table.AddColumn(Source, "Worklog", each GetWorklog() ) in JiraWorklog
If it doesn't work, you could refer to this case: https://community.powerbi.com/t5/Desktop/New-user-add-custom-column-that-queries-data-from-Web-Content/m-p/788623
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
113 | |
99 | |
82 | |
70 | |
60 |
User | Count |
---|---|
149 | |
114 | |
107 | |
89 | |
67 |