New Power BI Desktop Features Just Released

Microsoft has just released its December update of Power BI updates to both Power BI Desktop and the Power BI Service.  Here are some of the latest features included in the release.  These are just some of the features – see the link above for the complete list.

New Data Entry Feature

One of the key challenges in any BI solution is seems to be one piece of data that isn’t in a system – it needs to be data entered by people.

Power BI Desktop now supports the ability to copy and paste data into a table or to dynamically create a table on the fly and data enter the data into it. 

Changing Decimal Places and Text Sizes in Visuals

In Power BI Desktop, you can now format the number of decimal places and text size in visuals.

Improved Layout of Visuals and Format Painter

One of the key missing features in Power BI Desktop was basic alignment of visuals on the dashboard.  With this release you can align, distribute and size dashboards

You can also now format multiple dashboards using the Format Painter as well.

New Stacked Area Chart

R Visuals Integration

Power BI Desktop will now support R visuals within dashboards (in preview).  Using R scripts, you can use R’s plotting capabilities to create visualizations and integrate them into the dashboard.

Support for Live SSAS Multidimensional Hierarchies

Power BI Desktop will now support live exploration of SSAS multidimensional model hierarchies and use these within their reports for drill down.

Read More

Provisioning SharePoint Site Collections in Office 365 or SharePoint 2013 through Code

We were working on some provisioning code for creating and deleting site collections in Office 365.  Microsoft provides the SharePoint 2013 Client Components SDK that includes a tenant library for managing activities such as creating and deleting site collections.

The lifecycle of a site collection is three stages, not two: 1) create the site collection; 2) delete the site collection and 3) remove the site collection from the second stage recycle bin.  SharePoint will not allow you to create a site collection with the same URL as an existing site collection even if it is in the recycle bin.  Using the Office 365, there is no ability to empty the second stage recycle bin at all and the default waiting period is 30 days before it is permanently removed, so the only method for removing the Site Collection from the recycle bin is through code.

Creating a Context

In order to use any of the client methods, you will need a client context.  The code for logging into Office 365 looks like this:

public ClientContext Login(string URL)
{
     SecureString passWord = new SecureString();
     foreach (char c in Password.ToCharArray()) passWord.AppendChar(c);
     ClientContext tenantContext = new ClientContext(URL);
     tenantContext.Credentials = new SharePointOnlineCredentials(Username, passWord);
     return tenantContext;
}

public ClientContext LoginTenant()
         {
             return Login(TenantAdminURL);
         }

The URL in this case needs to be the tenant admin URL which is in the format XXX-admin.sharepoint.com where XXX is the name of your tenant.

Creating a Site Collection

Creating a site collection requires a number of properties to supply in the creation process such as the TItle, URL, resources, etc. for your new site collection.  The tenant library provides the methods for creating a site collection.

I created a value object to store these properties like this:

public class SharePointSiteCollection
    {
        public string URL { get; set; }
        public string Title { get; set; }
        public string Owner { get; set; }
        public string RootSiteTemplate { get; set; }

       public int StorageLimit { get; set; }
        public int ResourcePoints { get; set; }
    }

This makes it easier to pass around the configuration information as an entity and will support serialization of the configuration data at some point in the future.

The method for creating a site collection looks like this:

public void CreateSiteCollection(SharePointSiteCollection SiteCollection )
{
     using (ClientContext ctx = LoginTenant())
     {
         //Properties of the New SiteCollection
         var siteCreationProperties = new SiteCreationProperties();
         var tenant = new Tenant(ctx);
         string URL = AssembleAbsoluteURL(SiteCollection.URL);
         siteCreationProperties.Url = URL;
         //Title of the Root Site
         siteCreationProperties.Title = SiteCollection.Title;
         //Email of Owner
         siteCreationProperties.Owner = SiteCollection.Owner;
         siteCreationProperties.Lcid = (uint) LCID;
         //Template of the Root Site. Using Team Site for now.
         siteCreationProperties.Template = SiteCollection.RootSiteTemplate;
         //Storage Limit in MB
         siteCreationProperties.StorageMaximumLevel = SiteCollection.StorageLimit;
         //UserCode Resource Points Allowed
         siteCreationProperties.UserCodeMaximumLevel = SiteCollection.ResourcePoints;
         //Create the SiteCollection
         SpoOperation spo = tenant.CreateSite(siteCreationProperties);
         ctx.Load(tenant);
         //We will need the IsComplete property to check if the provisioning of the Site Collection is complete.
         ctx.Load(spo, i => i.IsComplete);
         ctx.ExecuteQuery();
         Console.WriteLine(“Waiting for site collection to be created.”);
         //Check if provisioning of the SiteCollection is complete.
         while (!spo.IsComplete)
         {
             //Wait for 30 seconds and then try again
             System.Threading.Thread.Sleep(30000);
             spo.RefreshLoad();
             ctx.ExecuteQuery();
         }
         Console.WriteLine(“Site collection created.”);


    }


}

Note the process for waiting for the site collection process to complete – creating a site collection can take a few minutes and the method simply waits until finished before completion.

Deleting a Site Collection

Deleting a site collection can be done using the following code:

public void DeleteSiteCollection(string URL)
         {
             URL = AssembleAbsoluteURL(URL);
             using (ClientContext ctx = LoginTenant())
             {
                 var tenant = new Tenant(ctx);
                 var spo = tenant.RemoveSite(URL);
                 ctx.Load(spo);
                 ctx.ExecuteQuery();


                Console.WriteLine(“Waiting for site to be deleted.”);


                //Check if provisioning of the SiteCollection is complete.
                 while (!spo.IsComplete)
                 {


                    //Wait for 30 seconds and then try again
                     System.Threading.Thread.Sleep(30000);
                     spo.RefreshLoad();
                     ctx.ExecuteQuery();
                 }


                Console.WriteLine(“Site deleted.”);


            }


        }

Removing the Site Collection from the Recycle Bin

The last step is to remove the site collection from the second stage recycle bin. 

public void RemoveSiteFromRecycleBin(string URL)
         {
                 URL = AssembleAbsoluteURL(URL);
                 using (ClientContext ctx = LoginTenant())
                 {
                     var tenant = new Tenant(ctx);
                     var spo = tenant.RemoveDeletedSite(URL);
                     ctx.Load(spo);
                     ctx.ExecuteQuery();


                    Console.WriteLine(“Waiting for Site to be removed from the recycle bin.”);


                    //Check if provisioning of the SiteCollection is complete.
                     while (!spo.IsComplete)
                     {


                        //Wait for 30 seconds and then try again
                         System.Threading.Thread.Sleep(30000);
                         spo.RefreshLoad();
                         ctx.ExecuteQuery();
                     }


                    Console.WriteLine(“Site removed from the recycle bin.”);


                }
         }

Read More

Conflict between Latest NUnit Framework and NUnitTestAdapter

I was working with Visual Studio 2015 today, and ran into an issue running NUnit tests.  The basic process to integrate NUnit into Visual Studio is to use the NuGet package manager and install the NUnit framework and the NUnit Test Adapter.

However, if you install the latest version (currently 3.0.1) the NUnit Test Adapter doesn’t discover your tests.  I did a bit of research and the latest version isn’t supported.

image

If you run into this problem, uninstall NUnit Framework 3.0.1 and instead install version 2.6.4.

imageThen the NUnit Test Adapter works as expected.

Read More

Power BI Now Supports QR Codes

Microsoft has just released support for QR Codes in Power BI!  If you go into the “in focus” view of a dashboard and click on the ellipsis on the right of the dashboard, you can now generate a QR code that will work as a link to that dashboard from your mobile phone.

image

The possibilities are quite exciting – for example, if you were running a manufacturing plant you could put a QR code label on every piece of equipment and then use your phone to launch the Power BI app to show a dashboard specific to that machine.

Read More

Azure Security Center for Auditing Your Azure Resources Released in Preview

Microsoft has released a new Azure Security Center for Azure in preview.  The new service audits your existing Azure resources and provides threat analysis and recommendations on how to mitigate issues found. 

image

For each of these resources, the service provides a health check and recommendations on improving the security posture of your resources!

Read More

New Azure CDN Features and Premium Service Released

Azure CDN is a global content delivery network for distributing content to local servers to improve latency and performance.  Azure CDN works with either a storage account or an Azure Web Site as the source of its cache and then uses HTTP headers to dictate how long content is cached within its network.

Microsoft has just released a new Azure CDN Premium service which provides additional fine grained rules for managing how content is cached.

In addition, Microsoft has added a key feature that was missing – the ability to purge content.  You can now go either through the Azure Portal or through the new CDN API and invalidate your CDN cache or individual URLs.

Microsoft has also rolled out new pop locations in India, Australia and South America.

Read More

Power BI Enterprise Gateway Released in Preview

As previously noted, Power BI’s weak link for on premise integration has been the personal gateway.  It relies on an end-user to install it on their desktop to provide refreshes from on premise data sources to the Power BI service. 

Microsoft has now released the new Enterprise Gateway in preview.  The new Enterprise Gateway provides similar functionality but in a centralized way that can be administered by IT.

Key features of the new Enterprise Gateway include:

  • Ability to service a large number of end-users from a single or multiple gateways
  • Centralized credentials and configuration of data sources
  • Live connection to on premise SQL databases

A number of connectors are not available yet in this released but are expected in the near future – notably the SSAS connectors to tabular and multidimensional models. 

Read More

Microsoft Unveils New Quick Insights for Power BI

As part of the evolution of the Power BI service, Microsoft has unveiled a new set of “Quick Insights” that will look into your data for interesting features of your existing data.

The Power BI service will provide the ability to detect outliers and anomalies in the data that you provide including:

  • Major factors influencing the data
  • Category outliers impact specific measures
  • Anomalies in time series data
  • Upward and downward trends
  • Seasonality detection in time series data
  • Correlations across multiple dimensions and measures

These insights will be available as part of the service…

Read More