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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
Anonymous
Not applicable

Append rows in direct query

Hi All,

 

Hope you're doing good.

 

I need to monitor the SQL job status in Power BI. To do that I'm connecting msdb.dbo.sysjobs tables and retrieving records in power BI with direct query and I'm able to see the job status. I've been asked by my manager to show the Job status for multiple servers (e.g Dev,UAT and Prod enviroment) but the problem is I've to show all server job status in single visual. and to do that I tried appending records in one table but the moment I append the rows in one table it is silently converting my connection to Import mode.

This is how my visual should look like. 

CountryNameEnvironmentJob NameStatus
IndiaDevLoad Stg DataRunning
IndiaUATLoad Stg DataError
IndiaProdLoad Stg DataSuccess
FranceDevLoad Data MartSuccess
FranceUATLoad Data MartSuccess
FranceProdLoad Data MartRunning


Please let me know any workaround to get the desired result. 

Note - I can not use Import mode. I've to connect is with direct query only.

2 REPLIES 2
Anonymous
Not applicable

Hi @jaideepnema I can not use union in sql server as my tables are on diffrent server. if at all I want to use union then I'll need to create linked server.

jaideepnema
Solution Sage
Solution Sage

Hi @Anonymous ,

did you tried using a query like this :

 

select countryname,environment,jobname,status from table a

union

select countryname,environment,jobname,status from table b

 

I would suggest if you can modify the sql query  or you can also a view which has all the data from multiple servers.

Solved: Edit Existing SQL - Microsoft Power BI Community

 

Please accept this as a solution if your question has been answered !!

Appreciate a Kudos 😀

 

Helpful resources

Announcements
PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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