Forum Discussion

KhyaiBhavani's avatar
KhyaiBhavani
New Member
4 years ago

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=271defb96fc22100362401dfde3ee4a0^ORassignment_group=e6914d384ca741006ec244523f089d15^numberSTARTSWITHTAS^stateIN-55,3^numberSTARTSWITHTAS^ORDERBYDESCnumber&sysparm_limit=35000&sysparm_display_value=true&sysparm_fields=number,closed_at"))

 

Source in 2nd query:

TasksCloseLastYear = = Text.Combine({"https://domain.service-now.com/api/now/table/sc_task?sysparm_query=closed_atBETWEENjavascript:gs.dateGenerate('" ,
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

Could someone help me on this on urgency.

 

Thanks,

Khyati.

4 Replies