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

Next up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. Register now

Reply
KhyaiBhavani
New Member

Powerbi - Dynamic query - Refresh not working - Need support

Hi, 

 

I am Khyati, working on a client requirement to integrate the Servicenow and Powerbi to get last one year data of the Incidents and Tasks.

As the data is huge(morethan 60K items), I have used 2 different queries in PowerBi and combined these two in the third one and then used the 3rd query in the Graph. 

Source in 1st query:

TasksClosedThisYear= = Json.Document(Web.Contents("https://domain.service-now.com/api/now/table/sc_task?sysparm_query=closed_atONThis year@javascript:gs.beginningOfThisYear()@javascript:gs.endOfThisYear()^assignment_group=...

 

Source in 2nd query:

TasksCloseLastYear = = Text.Combine({"https://domain.service-now.com/api/now/table/sc_task?sysparm_query=closed_atBETWEENjavascript:...('" ,
Custom4,"','00:00:00')@javascript:gs.endOfLastYear()^stateIN-55,3^assignment_group=271defb96fc22100362401dfde3ee4a0^ORassignment_group=e6914d384ca741006ec244523f089d15^numberSTARTSWITHTAS^ORDERBYDESCnumber&sysparm_limit=37000&sysparm_display_value=true&sysparm_fields=number,closed_at"})

 

Custom4 is the dynamic date used

 

Source in 3rd query: Source= Table.Combine({TasksClosedThisYear, TasksCloseLastYear})

Once I publish the powerbi report to workspace, initially there were refresh options and the autorefresh is getting failed. But later the refresh options are also not visible.

Below is the error I got

KhyaiBhavani_0-1652290354739.png

Could someone help me on this on urgency.

 

Thanks,

Khyati.

4 REPLIES 4

Hey Khyati @KhyaiBhavani 

I would like to propose you to try out an alternative option connecting Power BI and Servicenow:

Power BI Connector for ServiceNow app

We have a handy User and Admin Guides for your convenience, but feel free to reach out support team at support@alpha-serve.com if you need any assistance.

Cheers,

Anton

lbendlin
Super User
Super User

Please read this document thoroughly, especially the Query part.

 

Web.Contents - PowerQuery M | Microsoft Docs

 

That may help you to mask the dynamic part.

Hi Ibendlin,

 

Thank you for reply. I already tried this but not getting how to get the last one year tasks data from servicenow ina  single query as the data is more(near to 1L and 1L+). If you have any option to get the data in a single query please let me know.

 

Thanks,

Khyati.

That would be a question for the ServiceNow API - check if it supports pagination.

Helpful resources

Announcements
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.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

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