Welcome to Community Week 2025! Join us to learn, connect, and be recognized as we celebrate the spirit of Community and the power of AI. Get the details  

Show reports in power bi for problem list

chandan1994
Tera Contributor

Hello Team,

i have a requirement to show the report in power bi from servicenow problem table, please how to do this.

should i do power bi integration , if yes please provide the steps too as i am new to integration.

Thanks in advance.

1 ACCEPTED SOLUTION

Raks
Tera Contributor

I guess there some issue with the URL you are using:

Go to REST APi explorer and in there below the Prepare request option select the problem table from the drop down.

Click on the send button you will get a correct url for the request .

replace the url in code with the one you will get in the REST API explorer.

Remeber to change this part only. 

https://<host>.com/api/now/table/problem

View solution in original post

27 REPLIES 27

chandan1994
Tera Contributor

find_real_file.pngHello Raks,

 

After putting the blank query in power bi then clicked on "close and apply" and 2nd screen shot as result.

Could you please assist me on how i can see the report on power bi, will be much help full as not familiar with the power bi tool.

And just to inform you i haven't done any changes in servicenowfind_real_file.png

Raks
Tera Contributor

Copy this code and after you create a blank query goto advance editor and replace the default code with this one.Remember to replace the host name.

Then close and apply. It would work 

let
  Pagination = List.Skip(List.Generate( () => [WebCall=[result = {0}], Page = 0, Counter=0], // Start Value
    each List.Count([WebCall][result])>0 or [Counter] =0, // Condition under which the next execution will happen
    each [ WebCall = Json.Document(Web.Contents(" https://<host>.com/api/now/table/problem?&sysparm_limit=1000&sysparm_offset=1",

    [Query=[sysparm_offset =Text.From([Counter])]])),
    Page = [Page]+1,
    Counter = [Counter]+1000// internal counter
    ]
    ) ,1),
  #"Converted to Table" = Table.FromList(Pagination, Splitter.SplitByNothing(), null, null, ExtraValues.Error),
  #"Expanded Column1" = Table.ExpandRecordColumn(#"Converted to Table", "Column1", {"WebCall", "Page", "Counter"}, {"WebCall", "Page", "Counter"}),
  #"Expanded WebCall" = Table.ExpandRecordColumn(#"Expanded Column1", "WebCall", {"result"}, {"result"}),
  #"Expanded result" = Table.ExpandListColumn(#"Expanded WebCall", "result")
in

#"Expanded result"

chandan1994
Tera Contributor

find_real_file.pnggetting below after adding in advance editor 

Raks
Tera Contributor

Do you have access to ServiceNow rest API? You can check the access in the REST API Explorer in the ServiceNow

chandan1994
Tera Contributor

Hello Raks,

Yes i have access could you please tell me what to check herefind_real_file.png