Wednesday, 27 July 2016

SharePoint/Office 365 List Data Source – Microsoft Power BI




SharePoint/Office 365 List Data Source – Microsoft Power BI

 

Recently, My manager given me a responsibility to track UAT issues in my project. So I have to track them regular basic and sent reports daily to all managers for status update.  

Initially, thought of exporting the list contents to Excel and sent it to all managers. I did that for couple of days. Later I thought of exporting the list contents to Excel a Pie Chart within Excel workbook. Display the same chart in SharePoint using Excel web part. This works well. But the issue is, if the source data changes, you need to update the excel.  There is no direct sync between SharePoint list and the Pie Chart.


After some research, found that we can use Microsoft Power BI to analyze the list and build the chart. Office 365 App launcher has the web version of the Power BI. But after connecting to SharePoint list found that, web version works only with SharePoint document library, not with SharePoint Lists. It doesn’t even populate SharePoint lists while making a connection to SharePoint.



After some exploration found that, we can use combination of Desktop Power BI and web version of Power BI to integrate with SharePoint List.

So without much wasting time, lets begin.


  1. Download the Desktop version of the Power BI. https://www.microsoft.com/en-us/download/details.aspx?id=45331
  2. After installation, open the “Power BI Desktop” icon from your desktop.
  3. Click on Get Data and Select SharePoint Online List. Enter the Site URL.





  1. Click on Sign In and Sign in with your office 365 credentials.


  1. Select the appropriate login. In my case it is “Organizational Account”.


  1. Select the List (in my case it is “UAT” List) from the display and click on Load Optionally, you can remove/manipulate the columns and its values based on the type of report you wish to have. In my example, I want to create a simple report of issue tracker status.like No. of issue, assigned to whom, Application wise open issues etc. 
  2. On Visualisations, select the Pie Chart. Drag and drop the Parameters. Similarly I used lots of Visualisation for prepare full reports like Card, Clustered bar chart and Column chart etc.



  1. Save the file with extension pbix.
  2. Click on Publish button on the Ribbon. This will push the Report and its Dataset to your Office 365 Power BI Version.


  1. Once, it is uploaded to web version of Power BI, you need to update the connection and the Refresh duration

Update the Connection and Refresh Duration:

  1. In web Power BI version, click on the on the Data Connection, under Datasets.
  2. Under Data Source Credentials, click on Edit Credentials. Select OAuth2 and provide your credentials.


  1. Click on Schedule Refresh and make the changes.

Sharing:

There are 3 ways you can share the Report from Power BI

Share the Dashboard

  1. Click on + sign under Dashboard and give a name.
  2. To add the Report, select the Report and click on “Pin Live” Page.
  3. Select the Dashboard and click on Pin Live.



Share the Report via Content Pack:

  1. Click on Gear icon and click on “Create Content Pack”
  2. Give user email address, select the Report to you wish to share.



Share it via Public URL or via embedded URL:

  1. Click on the Report and click on “Publish to web” in the File menu.
  2. The popup will give you the direct URL or you can put the embed the code in Iframe.
  3. You can use this embed code in a SharePoint page to display the report.

Power BI here to stay in Microsoft eco-system and it is evolving every day.  Power BI solution is designed to help business users gain insights from their data and visualise them in a self-service way. Like SharePoint 2016, Power BI can provide solutions in hybrid scenarios.



Thank you,

Sunday, 19 June 2016

How to Install ASP.NET Core RC2 And Create Your First Application

How to Install ASP.NET Core RC2 And Create Your First Application

 

It've been adding support for a growing number of operating systems. We started out the project with a plan to support .NET Core on Windows, OS X and Linux. Close watchers of the coreclr and corefx projects will have noticed that the platform support has been growing steadily. .NET Core RC2 is supported on the following platforms.
  • Red Hat Enterprise Linux 7.2
  • Centos 7.1
  • Debian 8.2+
  • Ubuntu 14.04 (16.04 support is coming at RTM)
  • Linux Mint 17+
  • OS X 10.11
  • Windows 7+ / Windows Server 2012 R2+
  • Windows Nano Server TP5
.NET Core RC2 will soon be showing up in the Red Hat Enterprise Linux software collection. You will be able to install it with yum, following instructions which will soon be posted to the redhatloves.net site.
Ubuntu was the first distro that we supported. We heard feedback that it made more sense to start with Debian, given that it is the parent of Ubuntu and many more distros. More recently, we added support for Debian, enabling .NET Core to be used in a larger set of Debian-based distros.
We intend .NET Core to be an open and flexible development platform. We’ll publish instructions in the next couple weeks on how to test .NET Core on arbitrary distros. You can see how Linux Mint is supported in runtimes.json, for example.

 

How to Install ASP.NET Core RC2

Installation of ASP.NET Core RC2 is simple but choosing the correct one may be tricky. Follow below steps to install ASP.NET Core RC2.

Uninstall ASP.NET Core RC1

The RC2 installer doesn’t override previous installation. So if you already have ASP.NET Core RC1 installed then you have to manually uninstall it and then install ASP.NET Core RC2.

Download the tooling and install it

So first let’s download and install tooling. With RC2 release, Microsoft has also put all the .NET Core related stuff on a new website dot.net (You can say dotdotnet. Though dotnet.net would have been good choice). So download the installer based on platform and architecture of your system from here. On that page, you will find a list of various downloads for each platform.
You probably only need to download one of these:
  • .NET Core = Run apps with .NET Core runtime.
  • .NET Core SDK = Develop apps with .NET Core and the SDK+CLI (Software Development Kit/Command Line Interface) tools.

 

So once downloaded, run the installer and this should install tooling on your system.

So when installation is finished, you should be able to create .NET Core application from command line.

Create your first .NET Core application

Let’s first verify the installation. So go to command prompt and type


and you should see 1.0.0-preview1-002702 as output.




So let’s create a new app. So execute following commands.


And as an output for dotnet run command, you should see “Hello World!” on command prompt. Congratulations for your first .NET Core RC2 app. Easy and straightforward. Isn’t?

Download the ASP.NET Core RC2 and install it

When you install tooling, you won’t get the RC2 templates in Visual Studio 2015. And as of now, with dotnet-cli you can’t create ASP.NET Core application. So download Visual Studio 2015 MSI installer from here. Note, the Visual Studio MSI installer requires that you should have Visual Studio 2015 Update 2 installed. So make sure to update your Visual Studio 2015 to Update 2. You can download Update 2 from here. If you don’t have Visual Studio already, you can download Visual Studio Community 2015 for free.
Once downloaded, run the Visual Studio MSI installer. You should see following setup screen.


And it will take sometime to finish. Okay, so all set now to create your first ASP.NET Core RC2 application.

Create your first ASP.NET Core RC2 application

With RC2, you will see separate templates for ASP.NET and ASP.NET Core project. Till RC1, this was not present. As you can see in below image. There are 3 options now.
  • ASP.NET Web application (.NET Framework) – Option to create ASP.NET application using .NET Framework 4.6
  • ASP.NET Core Web application (.NET Core) – To create cross-platform ASP.NET application using .NET Core
  • ASP.NET Core Web application (.NET Framework)– To create ASP.NET Core web application targeting .NET 4.6 for windows platform only.


Also notice on right-hand side, there is a separate entry for .NET Core templates.


For this post, we shall create a ASP.NET Core Web application (.NET Core) option. Once you provide web application name and hit ok you should see following project template selection dialog. This now lists only those templates that are applicable to ASP.NET Core 1.0.

Select Web Application and click OK to create the project. Solution explorer should look like shown below.

I already covered the changes in my post about web.config, new program.cs file and project.json changes. So I recommend you to read the post for all changes in RC2.
Hit F5 and run the application. And you should see your application running with default ASP.NET Core template. Let’s modify code to display a welcome message on the screen. So open HomeController from the Controllers folder and modify the Index() action as follows:


Now let’s modify the view to show the message. So go to Index.cshtml from the Views > Home folder and replace the HTML markup with :



And now just run the application and you should see your message in the browser.