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.
Hi,
not exactly sure if this can be done but this is what I'm trying to do.
I have a query that generates dates between a given period:
let StartDate = #date(prmBaseCalendarStartYear,1,1), EndDate = #date(prmBaseCalendarEndYear,1,10), NumberOfDays = Duration.Days( EndDate - StartDate ), Dates = List.Dates(StartDate, NumberOfDays+1, #duration(1,0,0,0)), #"Converted to Table" = Table.FromList(Dates, Splitter.SplitByNothing(), null, null, ExtraValues.Error), #"Renamed Columns" = Table.RenameColumns(#"Converted to Table",{{"Column1", "Date"}}), #"Changed Type" = Table.TransformColumnTypes(#"Renamed Columns",{{"Date", type date}}) in #"Changed Type"
And query returns the following result.
I want to call Jira API for every date and return results in a table, so I have created a function with following code:
(prmdate as date) => let #"Source" = Json.Document((Web.Contents("https://issuetracker.site.com/jira/rest/api/2/search?jql=project=myproject+AND+issuetype+IN+(Incident,+Bug)+AND+createdDate<="&Date.ToText([prmdate],"yyyy-MM-dd")&"+AND+status+WAS+NOT+IN+('Development done', +'Ready for testing', +'In Testing', +Tested, +'Under review', +Closed)+ON+"&Date.ToText([prmdate],"yyyy-MM-dd")))) in #"Source"
Invoking this function gives me the following error:
My idea was to call this function from Custom Column in Dates table and expand table for columns in response result.
Can this be done and how?
Thanks in advance....
Solved! Go to Solution.
@Anonymous
You may just remove square brackets.
Date.ToText(prmdate
@Anonymous
You may just remove square brackets.
Date.ToText(prmdate
That worked like a charm. 🙂 Thank you!
Any suggestions on the first part of the problem? How to fill in dates table with data retrieved by function....
Anyone? 🙂
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 |
---|---|
111 | |
95 | |
80 | |
68 | |
59 |
User | Count |
---|---|
150 | |
119 | |
104 | |
87 | |
67 |