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

Get certified in Microsoft Fabric—for free! For a limited time, the Microsoft Fabric Community team will be offering free DP-600 exam vouchers. Prepare now

Reply
Anonymous
Not applicable

Power BI API Connect to AKMS

So i have no clue what im doing.
I've only ever connected to an api like this once before.
I would love any help. I think i might be pulling the wrong data? I get this error after running the code below:

DvdH_0-1669884809002.png

 

let
GetAuth = Web.Contents("https://huntsman.acceleratorkms.com/token",
[
Headers = [#"Accept"="application/json",
#"Content-Type"="application/x-www-form-urlencoded;charset=UTF-8"],
Content = Text.ToBinary("username=******&password=******&grant_type=password")
]),
FormatAuthAsJson = Json.Document(GetAuth),
access_token = FormatAuthAsJson[access_token],
ReportData = Html.Table(Web.Contents("https://company.acceleratorkms.com/content/search"), {}),
#"Converted Data To Table" = Table.FromList(ReportData, Splitter.SplitByNothing(), null, null, ExtraValues.Error),
ColumnNames = List.Union( List.Transform(#"Converted Data To Table"[Column1],
each Record.ToTable(_)[Name])),
#"Expanded Report Data" = Table.ExpandRecordColumn(#"Converted Data To Table", "Column1", ColumnNames)
in
#"Expanded Report Data"

 

2 REPLIES 2
amitchandak
Super User
Super User

@Anonymous , I think you are already getting data in table format and you trying us that as list

I doubt this step Table.FromList , before this step check if you getting expand icon then use that and expand it and test

 

debug issue
https://www.youtube.com/watch?v=OE6DPmKqN7s


refer how to handle error in power query
https://www.youtube.com/watch?v=OE6DPmKqN7s
https://www.youtube.com/watch?v=9-Lag0VOiTs

 

 

If this does not help
Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.

Join us as experts from around the world come together to shape the future of data and AI!
At the Microsoft Analytics Community Conference, global leaders and influential voices are stepping up to share their knowledge and help you master the latest in Microsoft Fabric, Copilot, and Purview.
️ November 12th-14th, 2024
 Online Event
Register Here
Anonymous
Not applicable

Hey! I sadly don't get to debug with try because the table i get is completely empty when i expend it i get this: 

DvdH_0-1669902764220.png
Sample data:

Operator nameAssignedTotal number of completions in last 365 daysCompleted in last 365 days
 

 

Acknowledged 
Acknowledgements expiring soonAcknowledgements expiredNot acknowledged
Name 1491472125000241
Name 22940011200182
Name 33530010800245
Name 423335110000132
Name 5233816000172

Helpful resources

Announcements
OCT PBI Update Carousel

Power BI Monthly Update - October 2024

Check out the October 2024 Power BI update to learn about new features.

September Hackathon Carousel

Microsoft Fabric & AI Learning Hackathon

Learn from experts, get hands-on experience, and win awesome prizes.

October NL Carousel

Fabric Community Update - October 2024

Find out what's new and trending in the Fabric Community.