|
Klassiska filtyper är inte längre tillgängliga för användning från och med januari 2021. Du kan överföra dina klassiska filer eller ladda ner en PDF. Läs mer

Script to Pull Report into PowerBI

2

Kommentarer

3 kommentarer

  • Isabel Messore

    Amazing Danielle Okland, thank you for sharing this!

     

    0
  • Chris Omland

    This is great! Thank you for taking the time to share.

    0
  • Sander van Duinen

    I would like to echo the others and say: Amazing stuff Danielle! Thanks for taking the time to share :-)

    Second, I wanted to build upon Danielle's awesome work to make Workiva API's even more approachable. Specifically: the code snippet above assumes the API response is text/csv (through adding the header 'Accept = "text/csv"'). However, in a recent case of mine the response came over in JSON regardless. In these cases, the response can parsed in PowerBi as presented below. 

    response = Json.Document(Web.Contents(url, [Headers=api_headers])),
    data = response[data],

       // Convert the response to a table
    #"Converted to Table" = Table.FromList(data, Splitter.SplitByNothing(), null, null, ExtraValues.Error),
    #"Expanded Column1" = Table.ExpandRecordColumn(#"Converted to Table", "Column1", {"responseProperty1", "responseProperty2"}, {"RenameResponseProperty1", "RenameResponseProperty2"})

    // Note that Workiva API's can return lists/records that require further expansion in PowerBi. This can be achieved through the Power Query Editor.

    in

        #"Expanded Column1"
    1

Du måste logga in om du vill lämna en kommentar.