In 2012, Ilse Van Criekinge published a great article on Extending your Lync monitoring data using PowerPivot and Power View. This article included a built-in Excel file that integrated into the Lync Monitoring Data database and allowed you to use Excel Power Pivot to look in into a few reporting examples made by IIse.
Following that blog article, I’d like to show you the process on how exactly you can integrate Excel and the Lync Monitoring data and a few examples of what you can do with that.
Integration:
- Open Excel 2013 and enable the PowerPivot Add-in by going to File > Options > Add-Ins.
- In the Manage box, click COM Add-ins> Go.
- Check the Microsoft Office Power Pivot in Microsoft Excel 2013 box, and then click OK. If you have other versions of the Power Pivot add-in installed, these versions are also listed in the COM Add-ins list. Be sure to select the Power Pivot add-in for Excel 2013.
- On the Excel 2013 Ribbon, you should now see PowerPivot display. Click on it and choose Manage on the top left corner of the Ribbon.
- On the Power Pivot for Excel screen that opens, Click on “From Database” and choose “From SQL Server” to load the Table Import wizard which will allow us to import the monitoring data from the databases.
- In the “Table Import Wizard” screen prompt, type the Monitoring SQL Server name (No FQDN is required) and specify the Instance if there is any. If no Instances exist, type the server name only. If the name was entered correctly, you should be able to choose the Database name out of the drop down list below.
For the example below, I’ve chosen the LcsCDR database, but you can choose any type of database, or alternatively, you can import data out of the Lync Front End Servers such as RTCLOCAL or RTC databases.
- On the “Choose How to Import the Data” screen, choose “Select from a list of table and views to choose the data to import” or if you are familiar enough with SQL queries, choose the second option which will allow you query the databases with your custom queries.
- On the “Select Tables and Views” screen, select the tables you want to query or run the PivotTable/PivotCharts against it. For the examples below, I’ve chosen the following tables:
- You can also choose “Select Related Tables” if you want to let the Excel determine the associated tables based on the relationship configured in the SQL databases. Once you’ve selected the tables, click the Finish button to start importing the data.
- Once the import is done, the “PowerPivot for Excel” screen will show up and will display all the data imported from the Monitoring databases based on the tables selection.
- In order to perform analysis on the imported data, click the “PivotTable” button and select the type of pivot. In my examples I chose PivotTable and PivotChart.
- Once you’ve selected the PowerPivot option, on the right side of the screen you will be able to choose the Rows and Columns out of the existing tables being imported and also provide with some values and choose different filters for views. More on how to use PivotTable and PivotCharts here.
Examples
I decided to share 2 examples of usage with data imported from the LcsCDR database, but bear in mind that it’s up to you to decide how you’re going to use it and the options are almost unlimited.
Example #1 – Top 10 PSTN Numbers called from Lync Users
- In order to demonstrate this example, choose the following information:
- ROWS – [VoIP Details View].[ToPhone]
- COLUMNS
- FILTERS – [VoIP Details View].[ToUriType] and choose PhoneURI as the filter value in order to count only PSTN numbers as destinations.
- VALUES – Count of [VoIP Details View].[ToPhone]
- Once you’ve selected the following, you can see on the left side of the screen that the PivotTable is changing accordingly.
- In order to select the top 10 and also sort by the Count column, click on the Row Label sort button and choose Value Filters > Top 10
- In the Filter screen choose the top 10 out of the “Count of to Phone”:
- For sorting, choose “More Sort Options” and choose Descending “Count of ToPhone”:
- The result should be similar to that:
- Another great options, is also adding some Data Slicers, those can be helpful, for instance adding timeline slicer to filter the amount on calls per Months/Quarters/Years. To do so, choose the PivotTables Analyze Ribbon and select Insert Timeline:
- On the Insert Timeline screen, select the “SessionIdTime” and click OK:
- Once selected, the following Timeline filter will show up on the screen and will allow you to filter the amount of calls per date:
Please note that you can choose the same details and use PivotChart and play with the other column to display Source number instead of destination numbers and every other scenario you can think of.
Example #2 – Getting Last Logon Time for Users
The other example, is based upon a recent script that was released allowing you find Lync Orphaned users.
- Open the PowerPivot Screen and Select new PivotTable on a new Worksheet.
- Select the following:
- Insert Timeline and select “LastLoginDate”:
- One the screen that appears, filter with the Timeline slicer to display Years/Quarters/Days in order to show the results requested.
- The result should be similar to that:
For more great examples, please check this Blog and download the Excel files which include more samples for usage:
Filed under: Lync Tagged: LcsCDR, Lync, PowerPivot, Reporting Services
