Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Did you hear? There's a new SQL AI Developer certification (DP-800). Start preparing now and be one of the first to get certified. Register now

Reply
Anonymous
Not applicable

Dynamic dataset refresh error with Atlassian/JIRA API

I'm currently atempting to use the Atlassian/Jira rest api to get data into a report which works fine in desktop but when I upload to service I get the error: 

Something went wrong This dataset includes a dynamic data source. Since dynamic data sources aren't refreshed in the Power BI service, this dataset won't be refreshed.

 

If I just use the following part of the API url it works fine in service: 

https://xxx.atlassian.net/rest/api/3/search?maxResults=100

 

But since this only get me 100 results I found online that I had to use some way to get all the rows, so it ends up like this in the advanced editor, which is where it fails due to some of the components:

 

 

 

 

let
BaseUrl = "https://xxx.atlassian.net/rest/api/3/search?",
JQL = "jql=project=DA",
Fields = "&fields=id,key,created,updated,worklog",
PageSize = 100,
    GetPage = (StartIndex as number) =>
        let
            Url = BaseUrl & JQL & Fields & "&startAt=" & Number.ToText(StartIndex) & "&maxResults=" & Number.ToText(PageSize),
            Source = Json.Document(Web.Contents(Url)),
            Issues = Source[issues] 
        in
            Issues,

    FirstPage = Json.Document(Web.Contents(BaseUrl & JQL & Fields & "&startAt=0&maxResults=1")),
    TotalIssues = FirstPage[total],
    PageNumbers = List.Numbers(0, Number.RoundUp(TotalIssues / PageSize), PageSize), 

    AllPages = List.Transform(PageNumbers, each GetPage(_)),

    CombinedData = Table.FromList(List.Combine(AllPages), Splitter.SplitByNothing(), {"Data"}),

    ExpandedData = Table.ExpandRecordColumn(CombinedData, "Data", {"id", "key", "fields"}),
    FinalTable = Table.ExpandRecordColumn(ExpandedData, "fields", {"created", "updated", "worklog"}),
    #"Expanded worklog" = Table.ExpandRecordColumn(FinalTable, "worklog", {"worklogs"}, {"worklogs"}),
    #"Expanded worklogs" = Table.ExpandListColumn(#"Expanded worklog", "worklogs"),
    #"Expanded worklogs1" = Table.ExpandRecordColumn(#"Expanded worklogs", "worklogs", {"self", "author", "updateAuthor", "created", "updated", "started", "timeSpent", "id", "issueId"}, {"self", "author", "updateAuthor", "created.1", "updated.1", "started", "timeSpent", "id.1", "issueId"}),
    #"Expanded author" = Table.ExpandRecordColumn(#"Expanded worklogs1", "author", {"displayName"}, {"displayName"}),
    #"Expanded updateAuthor" = Table.ExpandRecordColumn(#"Expanded author", "updateAuthor", {"displayName"}, {"displayName.1"}),
    #"Added Custom" = Table.AddColumn(#"Expanded updateAuthor", "Time Spent SUM", each if [timeSpent] = null then 0
else
    (if Text.Contains([timeSpent], "d") 
     then Number.From(Text.BeforeDelimiter([timeSpent], "d")) * 24 
     else 0) +
    (if Text.Contains([timeSpent], "h") 
     then 
         Number.From(
             if Text.Contains([timeSpent], "d") 
             then Text.BeforeDelimiter(Text.AfterDelimiter([timeSpent], "d"), "h")
             else Text.BeforeDelimiter([timeSpent], "h")
         ) 
     else 0) +
    (if Text.Contains([timeSpent], "m") 
     then 
         Number.From(
             if Text.Contains([timeSpent], "h") 
             then Text.BeforeDelimiter(Text.AfterDelimiter([timeSpent], "h"), "m")
             else if Text.Contains([timeSpent], "d") 
             then Text.BeforeDelimiter(Text.AfterDelimiter([timeSpent], "d"), "m")
             else Text.BeforeDelimiter([timeSpent], "m")
         ) / 60 
     else 0)),
    #"Removed Errors" = Table.RemoveRowsWithErrors(#"Added Custom", {"Time Spent SUM"}),
    #"Changed Type" = Table.TransformColumnTypes(#"Removed Errors",{{"Time Spent SUM", type number}})
in
    #"Changed Type"

 

 

 

 

I'm assuming somewhere in the begining with total pages, first pages etc is where the issue is? 

 

1 ACCEPTED SOLUTION
lbendlin
Super User
Super User

Please follow the documentation. Use RelativePath and Query parameters. https://learn.microsoft.com/en-us/powerquery-m/web-contents#example-1

View solution in original post

1 REPLY 1
lbendlin
Super User
Super User

Please follow the documentation. Use RelativePath and Query parameters. https://learn.microsoft.com/en-us/powerquery-m/web-contents#example-1

Helpful resources

Announcements
April Power BI Update Carousel

Power BI Monthly Update - April 2026

Check out the April 2026 Power BI update to learn about new features.

Fabric SQL PBI Data Days

Data Days 2026 coming soon!

Sign up to receive a private message when registration opens and key events begin.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.