Importing Departments via API to PowerBI

Hi Am pulling in departments using below query:


let

    url=FreshServiceURL,

    Source = Json.Document(Web.Contents(url & "/itil/departments.json")),

    #"Converted to Table" = Table.FromList(Source, Splitter.SplitByNothing(), null, null),

    #"Expanded Column1" = Table.ExpandRecordColumn(#"Converted to Table", "Column1", {"created_at", "head_id", "id", "name", "prime_user_id", "head_name", "prime_user_name"}, {"department.created_at", "department.head_id", "department.id", "department.name", "department.prime_user_id", "department.head_name", "department.prime_user_name"}),

    #"Filtered Rows" = Table.SelectRows(#"Expanded Column1", each true)

in

    #"Filtered Rows"


I am only getting 10 records through (the first page of departments in Freshservice) where as I have 14 total. Any ideas where I am going wrong? 

1 Comment

We have recently launched forum for Freshworks developer community (https://community.developers.freshworks.com). We encourage all the developers to discuss queries, ambiguities, know-hows, and points of interest with fellow app developers and Freshworks’ engineers on the forum.  


Visit the forum to sign up and be part of the awesome developer community!


Do you please mind posting the same question in the new Forum? We have moved all our experts to this place where you can expect faster help.

Login or Signup to post a comment