Filters in Azure dashboards - azure

In an Azure dashboard, I can set a filter, but I don't see any way to use the filter value in the actual queries. I'm assuming that it might filter the final results automatically, but not all panels work the same way so that's not always effective. I don't seem to be able to reference it with the ${} syntax. Is there some other way or is this not actually supported?

In recent dashboards the Add filter option is not visible on Shared dashboard, see this to Open a shared dashboard.
Shared dashboard screenshot:
We can create an Azure dashboard programmatically by fetching the JSON representation of the dashboard. Export => Download.
In Azure monitor view we can do the filter by value of that property.
If we need any effect on a filter, we need to modify the queries like here.
The basic syntax for it,
where ${filter_name}

Related

Azure Dashboard Refresh doesn't update the data

The problem:
I have some Azure workbook queries pinned to my Azure Dashboard. The problem I found is that manually refreshing the Dashboard or the Workbook queries doesn't give me the updated data. However, reloading the Dashboard web page does give me the updated data.
What I have tried:
Use a chrome extension to automatically reload the page at set intervals. This helps me create a self-updating dashboard. However, I was wondering if there's a solution to this that doesn't involve third party tools.
Workbook parts pinned to azure dashboards will autorefresh with the azure dashboard's timerange and autorefresh settings if they are configured to use time range parameters:
https://learn.microsoft.com/en-us/azure/azure-monitor/visualize/workbooks-overview#dashboard-time-ranges
without a time range parameter, the dashboard doesn't know how to correctly modify user queries to use the dashboard's time range. (not all of the workbooks data sources support query text, so it isn't just parsing/modifying text)
for some data sources, like Azure Resource Graph, that itself have no built in concept of time, if you wanted the part to autorefresh, the simplest workaround is to add a comment in the query text that references the time range parameter. the query won't actively use it, but the step then knows it depends on a time range parameter and will be autorefreshed.

How to create multiple dashboards in OMS?

I keep on reading hints that there should be a way to create multiple dashboards in OMS (maybe even with different user access rights), but I really can't find how to add them.
All I see is the designer to add, adjust und remove tiles from the one default dashboard.
Can someone clarify if it's indeed possible to create multiple dashboards and if yes how?
Here is one possible reason why you may not be getting that option.
If your workspace has been upgraded to the new Log Analytics query language, then you cannot create new dashboards or edit existing dashboards.
https://learn.microsoft.com/en-us/azure/log-analytics/log-analytics-dashboards

PowerBI Embedded API functionality

I have some queries about the PowerBI Embedded API, and more so if functionality exists, and if so where can I find it.
In particular, I am looking to find, from the APIs (PowerBI, Embedded or Azure) where I can complete the following functions:
View the number of Rendered Views within a Workspace Collection
Delete a report/import which has been uploaded
Ability to find out how many renders a single report would create - I would find this especially useful given it is billable per render.
Additional functionality I am looking for, is also to be able to save the rendered chart to image or pdf and responsiveness in the dashboards.
I do realise its still in public preview, however, has anyone managed to find the above functionality within the current APIs.
Thanks
David
View Number of Rendered Views within a Workspace Collection:
Make a POST request to the following ARM API with Content-Length: 0:
https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.PowerBI/workspaceCollections/{workspaceCollectionName}/billingUsage?api-version=2016-01-29
Delete import:
Make a DELETE request to the following Power BI API:
https://api.powerbi.com/beta/collections/{workspaceCollectionName}/workspaces/{workspaceId}/datasets('{datasetKey}')
There is no API for this yet.
Consider making the suggestion at https://ideas.powerbi.com/.

comparing sharepoint list and sqlserver table

I have a list in sharepoint which maintains particular month OnCall list,and we are maintaining employee directory in sql server. My requirement is to get complete data from sql server and show it in sharepoint and compare with sharepoint list and show small icon for the employees who are On Call for that particular Month. Can anyone please suggest me the waus of implementing this.
Thanks in advance.
Update: I have finished the part where I have to connect to the sqlserver database and get the employees information. For this we are using 3rd party web part to connect to the sql server and pull the data from the table. Now I have to show some kind of image on the employee name to show that he is on-call for that week. We are going to cretae custom list for maintaing the list of people who are on-Call. Can anyone please advise me on how to accomplish this.
Write a custom webpart which will pull the data from the list using sharepoint object model and SQL server using ADO.NET and do the said comparison.
If you were looking for out of the box, I am afraid there i too little information given here to analyze if its feasible out of the box or not.
If you have the SharePoint Enterprise version, you can look at using the Business Data Catalog. This will let you bind columns to external data sources. This might provide you with the functionality you're looking for.
If you do not have the Enterprise features, do you have access to deploy WSP packages and custom code?
You will have to write your own data access to your external data source. Your options would be to have a job that pulls data from the external data source and populates SharePoint list(s) or create a custom view that pulls the external data on-demand.
You'll have to come up with synchronization strategies. Meaning, is the data in the external SQL data source static, reference information that does not need to be updated depending on what a user does in SharePoint? This seems to be the case based on your question. If you do need to update the external data source, you'll have to hook into the on save event (so probably a custom event handler that listens for ItemAdding) to update the data, validate, and optionally cancel the operation with an error message.
If you can't deploy WSP packages / DLLs, you could take a look at the jQuery SharePoint library. This will let you interact with lists using jQuery. If you also write a WCF or Web Service wrapper around the data you need access to from your external data source that is accessible from the SharePoint environment, you can use hack together a solution.
To accomplish this you'd need to place a Content Editor Web Part on the page you need custom data access. In there you will write the code to reference the jQuery javascript library and jQuery SharePoint library. The code will have to make the calls to your external data service and make any updates you need.
This is the least reliable method to accomplish what you want since it's entirely page-based and can be broken by simply disabling script or someone editing the CEWP or removing it altogether.
If you don't have access to place a CEWP or any of the other solutions, then you have no options at all.
it relatively easy now to pull all the data using the third party webpart and saving it into a custom list. I would recommend you not only creating custom list but also creating the content types for this list. take a look at SharPoint MVP's post about creating a Custom List with Content Types

Sharepoint: Best way to display lists of non-Sharepoint content with "compatible" UI?

I've built a web part for Sharepoint that retrieves data from an external service. I'd like to display the items in a way that's UI-compatible with Sharepoint (fits in with its surroundings.)
I'm aware of the "DataFormWebPart" but was unable to get one working properly. It requires a valid DataSource and I was unable to build one from the results of a web service call... Part of the problem is that my web service wrappers don't expose the XML return info, rather I have a bunch of deserialized objects. There doesn't seem to be an easy way to turn actual objects into a datasource, or populate a "generic" datasource from object data.
I could use an SPGridView to get the same UI, but the grid control doesn't have much in the way of smarts -and- it forces every field into its own column. I'd prefer to render each list item as a single cell with complex rendering (for instance the way that StackOverflow shows its lists of questions.) I'd also like to get as much of the Sharepoint-standard UI as possible, such as the sorting, filtering, and paging controls.
So, first: Has anyone here written a Sharepoint control that does this, and if so do you have sample code to share? If not: am I overlooking some useful control, whether MS-supplied or available in an external library?
Thanks!
Steve
Sharepoint: Best way to display lists
of non-Sharepoint content with
“compatible” UI?
Take a look at the built in sharepoint web controls:
Microsoft.SharePoint.WebControls Namespace
It contains all the controls used in sharepoint. I'd tell you more, but the documentation is very thorough.
Problem with SharePoint is that there are a bunch of different ways to do this. If your data is not changing too often and is not overly large it may be worth considering entering it into a list for display.
If you have the Enterprise licence it may be worth getting your data into the BDC and using it there.
you may have to convert the objects into xml or use the serialised objects with the XML webpart for display. This still has the issue of custom rendering using XSLT.
Here's a great article that explains how to configure BDC connections to web services using the BDC Definition Editor:
Creating a Web Service Connection by Using the Business Data Catalog Definition Editor
http://msdn.microsoft.com/en-us/library/bb737887.aspx
The best way to do this IMO is to make a Web Part. As a Web Part the UI will be automatically rendered to be the same as the theme the site is using (unless you override it) and it will be able to be placed anywhere by anyone with admin privileges.
Tutorial on making a Web Part
Tutorial on packaging and deploying a Web Part
Example Web Part Source Code
You could create a custom web part and use an SPGridView. You say you don't like it, because it forces every field into its own column, but that's not true. You can create a template (ITemplate) for every column and fully customize what's shown inside it, just like you would using a normal ASP.Net GridView. Using this approach I've added the little "New" images right next to a list item's Title, just like SharePoint does itself.

Resources