Quick Tip Adding Search to the Default Slicer in my Power BI Report

I always am amazed that there is still so much to learn with Power BI.

This week’s blog post is short and sweet, I am going to demonstrate how to add searching to the Default Slicer in my Power BI Report.

The main reason that I required this, is because currently (14 Aug 2018) the persistent filters only works with the Out of the Box Slicers. I had a requirement to be able to search on my slicer items.

I added my slicer to my report and changed it to be a drop down

It then looked like the following below.

All I had to do to enable the search to work was to click on the ellipses (three buttons, burger dots etc) and click on Search

Now when I click on my Slicer items I get a search option.

I then search for my first name which returns the following below, which allows me to select my name and slice my report by my name.

How awesome is that! It was like finding a nugget of gold for me, something that was there all along, but never thought to use it in this way.

As always if you have any comments or suggestions please leave them in the section below.

BI-RoundUp – Power BI (Desktop Release for August – New App Workspace Experience – Power BI World Tour) – Analysis Services (White Paper for AS Scalability)

Here is my weekly BI-RoundUp, and as I thought when I started putting this together yesterday that there would be a release of Power BI Desktop, which there is and not only that an updated App Workspace experience!

Enjoy the read!

Power BI – Desktop Release for August


Well that was pretty quick to get another release of Power BI Desktop. And I am sure that the release of Power BI Desktop will go back to the normal cadence of the first week of the month. With that being said let’s get into this month’s updates.

Reporting

You can now export your report pages to PDF currently only in Power BI Desktop. The Export to PDF will only export the visible pages. Currently wall papers or background images are currently not supported. This is some great functionality for those people who want to take the contents of a report and email it, or possibly print it out for a meeting or for customers.

Bookmark groups are now available, which allows you to group specific bookmarks together into a logical area. It is easy to create and allows you to group it based on your requirements such as organisational bookmarks or specific bookmarks relating to a certain subject. You can start from a bookmark group which will only play the bookmarks in that group. By starting with the default view, it will play through all the bookmarks.

Theming is now generally available, so you no longer have to enable it in the Preview Settings.

Using the List Slicer, there is now an option to Filter restatement which is similar to the restatement in the drop-down slicer.

Analytics

You can now use conditional formatting by values. What this means is that if your value has got the name of a colour or a HEX code the background color or font color can be formatted to use the values in that column. This means that you can use any color you need based on your data. Not only that but you do not have to manually add each color. The colors can be part of your dataset or DAX measure.

If you use Python scripts, this is now available in Power BI. You can import your script in the Power Query Editor and then use Python visuals in your reports. Whilst the visuals will render, and change based on other visuals in your report, currently the Python visual is NOT interactive.

Q&A is now generally available which means that you do not have to go and enable it in the Preview settings. There has also been an update to the matching experience in Power BI Desktop and Power BI Premium which will allow for better results when using Q&A

Modeling

You can now add data categories for measures in the form of Image or Web URLs. This will allow you to create a dynamic URL that can then be used to go through to another Power BI report with the filter applied within the URL.

The really exciting part of using a measure with a Web URL is that it will you will be able to render SVG images as shown above, based on your data and show it as sparklines or bar charts.

As shown above there are a whole host of new DAX Statistical functions.

There are a whole lot of new and interesting Custom Visuals which are part of the blog post.

The Spark connector is now Generally available.

A sneak peak of what is coming next month is having the expand and collapse buttons for tables and matrix. And updates to the scatter chart visual which will have the ability to use the categorical axis

All the details can be found here: Power BI Desktop August 2018 Feature Summary

Power BI – New App Workspace Experience

This blog post from the Power BI Team has got a lot of content, so I am going to highlight some of the new features in the new App Workspace Experience.

  • No longer will it rely of Office 365 Groups for the creation of an App Workspace.
  • You will be able to manage access from security groups, distribution lists and multiple existing Office 365 Groups.
  • New additional roles to manage access and permissions to the App Workspace.
    • Admin Role, Member Role, Contributor Role and Viewer Role
  • New Admin API which will give all the details of the new App Workspace details.
  • Associate a workspace to a OneDrive for Business

It is interesting to note that the new App Workspaces will not be brining across Content Packs. With that being said the Power BI Team is still working to bring across the full parity from Content Packs to Apps.

There also will be a migration plan to migrate all existing App Workspaces to the new App Workspaces which will be available at General Availability.

The detailed blog post can be found here: Enable your team with new workspace experiences (preview)

Power BI – Power BI World Tour

The Power BI World Tour will be coming to a city near you. Please see the link below with more details on which cities it will be happening in, as well as other event details.

I am very fortunate to be attending the Power BI World Tour in Sydney where I will be presenting 2 sessions Common Power BI Challenges and How to Overcome Them and My Power BI Report Has Hit The Size Limit, Now What?

I attended last year, and it was a great event, so if you can make it I would highly recommend it.

Here is the link to more details: 2018 Power BI World Tour – Powered by Your Local User Group

Analysis Services – White Paper for AS Scalability

To be honest I have already this white paper which is only 11 pages long, but it contains a lot of really useful and insightful information.

I always enjoy reading these white papers and I always learn something new. And this time it was to sort the dimensional tables by Surrogate Key (SK) to ensure that the engine will use Value Encoding.

I suggest reading through this because the same engine is used in Power BI Desktop, so you can apply the same techniques to your Power BI Model.

The White Paper Link is here: Whitepaper on modeling for AS tabular scalability

Convert from Seconds to Minutes with a DAX Measure

I was recently doing some consulting work for a customer and they had a column which contained seconds and whilst this is useful it is better to have it shown as Minutes and Seconds, which is easier to relate and compare.

Below I will show you how I came up with the DAX measure which converts it from seconds to minutes, and I will be using my Parkrun sample dataset. As shown below I have a table which shows the total seconds

Below is my DAX measure with an explanation on how I got to the measure

Secs to Mins = 
VAR TimeSecs =
    SUM ( 'ParkRun'[Total Seconds] )+1
VAR TimeMins =
    DIVIDE ( TimeSecs, 60 )
VAR JustSeconds =
    TimeMins - TRUNC ( TimeMins )
VAR JustMinutes =
    TimeMins - JustSeconds    
VAR JustSecondsInTime = JustSeconds * 60
VAR MySeconds2 =
    IF ( JustSecondsInTime < 10, FORMAT ( "0" & JustSecondsInTime, "00" ), JustSecondsInTime )
RETURN VALUE ( JustMinutes  & "." & LEFT ( MySeconds2, 2 ) )
  • Line 1
    • This is where I created the measure with a name
  • Lines 2 – 3
    • This is where I am summing up all the Total Seconds
  • Lines 4 – 5
    • I am creating a variable called TimeMins and then dividing the seconds by 60 to get the minutes.
  • Line 6 – 7
    • I am creating a variable called JustSeconds, and I am using the TRUN DAX function, so that this returns the remainder of the variable TimeMins, which is currently stored as a decimal.
    • NOTE: The above means that the remainder is stored as decimal point out of 100. So if the remainder is 0.50 that translates to 30 seconds. Which is shown below.
  • Line 8 – 9
    • I am creating a variable called JustMinutes, where all that I want is the Minutes, so I do this by subtracting the TimeMins from JustSeconds
  • Line 10
    • I am creating a variable called JustSecondsInTime, and what I am doing is converting the seconds from a decimal value back to time.
    • What this means is that if the decimal value was 0.50, the variable JustSecondsInTime will be converted to 0.30 which represents 30 seconds.
  • Line 11 – 12
    • I am creating a variable called MySeconds2, and what I am doing here is to ensure that if it is less than 10 seconds to add in a zero before the second number. This is so that it will be displayed as expected.
    • As shown below you can see where the seconds are less than 10 it is displaying correctly.
    • When looking at the image above it does appear that the seconds is not being displayed correctly. This will be resolved in the next step below.
  • Line 13 – 14
    • Now I am closing off the variable section to return the measure.
    • I begin with the DAX function called VALUE, this is because I want my DAX to be a measure in my model.
    • I then put in my variable called JustMinutes which is the minutes from the seconds that I defined in lines 8 & 9
    • Next, I put in a dot “.” This is to ensure that the VALUE will still work because it expects a value in the format of 99.22
      • If I had to change it from a dot to the colon the VALUE function would return an error.
    • I get the seconds to display correctly by using the DAX function LEFT ( MySeconds2, 2 )
      • What I am doing here is using the LEFT DAX Function to get the first 2 values starting from the left hand side. Which results in displaying the seconds

Now when I take my measure and put it into a table I get the Minutes and seconds displaying as expected.

I found that I really had to use the DAX variables to get this pattern to work as expected. With all the screenshots above, I changed the return function to the particular DAX variable that I was working on to ensure that it was returning the value that I was expecting.

If you have any questions or comments please leave them in the section below. I do hope that you found this useful.

BI-RoundUp – Power BI (July Desktop Update – Admin APIs & PowerShell for Power BI – Multi Geo Support for Power BI Premium – Power BI & SharePoint – On-Premise Gateway Update for July – Developer Update for July)

Since the Business Applications Summit there has been a whole host of updates to Power BI, so please find all the details below.

NOTE: This is once again a longer read with just so many updates that have come through. And it is well worth the read.

Power BI – July Desktop Update

As with every month I will highlight the features from the monthly update

Modeling

As shown in the picture above Composite models are now available in Power BI Desktop

What are Composite models? This is where you can combine DirectQuery (All other sources except for SSAS) with data that you have imported into your model (for example an Excel spreadsheet)

This allows you to combine data from DirectQuery with Imported data and it will all work well together. This is really an incredible feature and will allow for a whole host of new data scenario’s.

Along with this there is also now the capability to be able to do a Many:Many relationship, which will apply to all relationships in your composite model.

Reporting

There has been a big improvement to the Visual headers as shown above, now where the visual headers are within the visual. This is compared to the previous iteration where there was a big block above the visual. Not only this, but you can also control which visual aspects you want to be made available.

As shown above there is now the capability to create a Wall Paper which will format the grey area outside your report as shown above.

There has also been a theming update all the visual properties can be formatted through theming.

Shown above, there are now tooltips for Table and Matrix visuals. Not only that but now you can also toggle the switch to have Tooltips per visual in your report. By default they are set to be on.

The Slicer has got some updates for people who require accessibility, can now access the slicer and interact with it via the keyboard and screen reader

The formatting pane has had a revamp and as you can see above, it has had some subtle changes in terms of colouring to make parts easier to get to. As well as better spacing and new toggles to make the formatting experience that much better and easier to use.

There is now stepped line support in line and combo charts. As well as there are additional formatting options that can be used.

People have asked for the ability to be able to toggle data labels for individual series, and this has now been released for combo charts.

Previously when trying to sort items in a visual it was a bit of a challenge to get it done. But with the new updates as shown above, not only are the Sort Desc and Sort Asc separated, but now you can also pick which field you want to sort by.

There is now the ability to find insights through distributions of your data. Not only that but you can select different slicers as shown above with Mod, Low and High. To better understand the distribution of your data.

Custom Visuals

There now are Certified Custom Visuals from the Market place which have to meet code requirements and additional code check by the Power BI Team. You can see from the image above that they have got the blue tick.

There is now additional Organisational Custom Visual settings where the Admin can disable a Custom Visual and the next time the report is viewed, the visual will display as shown above to the end user. Another great Admin capability.

There are a whole host of new Custom Visuals shown below.

Visio Custom Visual

Mapbox Generally Available

Datatext Box

China Scatter Map

Data Connectivity

Direct Query support for IBM DB2 in preview.

There have been improvements to the Web Connector with support for importing multiple custom tables. And the ability to auto complete when specifying values. And the exposure of the Html.Table function in the Query Editor

And finally, the SAP HANA has now got default variables when input controls.

You can find all the blog post details here: Power BI Desktop July 2018 Feature Summary

Power BI – Admin APIs and PowerShell scripts

Whilst this might not look like the greatest screenshot above, what you now can do is access all Power BI Assets in a tenant. This is really awesome news and something that I have been waiting for quite some time.

As in the blog post it explains how you need to get it configured and then run the PowerShell scripts to get the data you require.

All the blog post details can be found here: Announcing APIs and PowerShell Cmdlets for Power BI Administrators

Power BI – Multi Geo for Power BI Premium

There is a preview release for Power BI Premium when creating it where you can specify where the data will reside. As shown above when selecting the capacity and assigning it to a workspace you can then assign it to a workspace in a specific region.

More details can be found here: Public Preview of Multi-Geo for Power BI Premium

Power BI – SharePoint and the road ahead

The Power BI Team has been looking to improve the integration between Power BI, Power BI Report Server and SharePoint.

Starting with SharePoint 2019 and SharePoint Online the following will be coming:

  • Adding support for all major report types across all platforms. This includes SSRS Reports, Power BI Reports and Excel Workbooks.
  • Recently announced easier ways to leverage CSV and Excel files from SharePoint directly into Power BI.

For Power BI Report Server the following will be coming:

  • Power Pivot Scheduled Refresh for Excel Workbooks.
  • Adding modern authentication support with ADFS (Active Directory Federation Services) / AAD (Azure Active Directory)

You can find the details here: Power BI and SharePoint – the road ahead

Power BI – On-Premise Data Gateway Update for July

The update for the On-Premise Data Gateway for July includes the following:

  • Public preview for the Custom Data Connectors in the Enterprise Gateway.
  • Request distribution of data queries across all gateways in a cluster.
  • Support for Single Sign On (SSO) for Spark in the Power BI Service.
  • Diagnostic check to see if the On-Premise Data Gateway can access all the ports required to work successfully.
  • It now includes the July version of the Mashup Engine.

All the details and more can be found here: On-premises data gateway July update is now available

Power BI – Developer Update for July

Below are the Developer updates for July:

  • Ability to programmatically control the visual headers for specific visuals, which is now also available in Power BI Desktop.
  • New Developer Center under the learning in the Power BI website which is a one stop location for users looking to develop solutions using Power BI
  • Power BI Embedded is now available in the China Cloud.
  • There have been some updates to the Custom Visuals to allow High Contrast mode Support for accessibility options.
  • Source code available for the following Microsoft Custom Visuals.
    • Heat Stream
    • Card Browser
    • Text Filter
    • Timeline StoryTeller

The details for this blog post can be found here: Power BI Developer community July update

Unleash row level security patterns in Microsoft Power BI – Business Applications Summit

I was fortunate enough to be able to attend the Business Applications Summit in Seattle this year.

I had an incredible time, met a lot of people that I have looked up to, read their blogs and watched their video’s. As well as made some new friends.

One of the things that stood out for me was how easy it was to chat to the people from the Microsoft Power BI Team (where I am currently focused), they were so friendly and always willing to hear my questions and feedback. I plan on returning next year.

With that being said, I presented two sessions, with one being Unleash Row Level Security Patterns in Power BI (which I was asked to present at the last minute due to Reza Rad having issues coming to the United States). So below is a link to the video and I hope that I did Reza proud.

Here is the link to the video: Unleash row level security patterns in Microsoft Power BI

As always if there are any comments or suggestions please leave them in the comments below.

Review of new Features coming to Power BI by Oct 2018 – From Business Applications Summit

I was fortunate to attend my first ever Business Applications Summit in Seattle.

I had the pleasure of sharing an Airbnb with Matt Allington, Phil Seamark and Miguel Escobar, it was great to spend time with these Power BI Legends. I also did meet a lot of people and got to chat with people in the Microsoft Power BI team, which was something I will always remember.

I also was fortunate to present 2 sessions (Unfortunately Reza and Leila could not make it) at the Business Applications Summit, both sessions went well, and the feedback was positive.

Ok, so enough about me, let me get onto ALL the new features that are planned to be coming to Power BI until October 2018.

One thing I can say is that I am SUPER excited with the new proposed features that are coming, it is most definitely going to make Power BI the go to BI tool going forward.

Along with this it is also growing up, and by that, I mean more enterprise features are coming, which means that it soon will be able to be implemented into a smaller organisation or a fortune 500 company.

Personally, I cannot wait to learn all the new features and start to implement them at customers. One caveat is I am certain that some features might take a bit longer to get into the service or could possibly change.

NOTE: This might be a bit of a longer post, so buckle up, here is the link to where I got a lot of the information: Overview of Business Intelligence October ’18 release

Other Features not mentioned in any of the notes

Below are some of the other features that I did not find in the release notes but there were some demo’s or pictures.

Print to PDF

As you can see above, coming to Power BI will be the ability to print to PDF which will look exactly like your Power BI report.

Display Folders – Multiple selection settings

As you can see above there is the ability to be able to set multiple measures or columns into a Display Folder.

Not only that but you will also be able to complete the settings over multiple columns.

And something not in this picture is the capability to see multiple data source views if you have hundreds of tables to make the data modelling experience easier.

Python Support

As you can see above there is Python Support coming to Power BI!

Personal Bookmarks

As shown above, there will be personal bookmarks coming to Power BI

Power BI Desktop

Below are all the Power BI Desktop upcoming features

Ad-Hoc Data Exploration

What this will be a user who does not have edit access to a report will be able to look at a chart on a different axis or change the chart type which could be more meaningful to the user.

It will be used with an option to choose a report and select “Explore from here”

Aggregations

This is a big change for Power BI where there the underlying data is a really large dataset that is stored in Spark or a SQL Server database. When connecting with DirectQuery you will be able to define aggregations which will cache just the aggregated data into memory into your model.

This will allow to have a dual mode so that if the query can be answered by the aggregated cache that will be used, and if not, it will then query the underlying DirectQuery source.

Composite Models (Available Now)

What Composite Models allow you to do, is to allow you to have data in one Power BI Desktop file where you are getting data from DirectQuery and imported data sources.

This is an amazing feature and I know something that a lot of people have been asking for.

With this you also now by default will have all relationships set to Many:Many.

As with the details it is always suggested to ensure that your DirectQuery source has been tuned and has the capacity to be able to answer the queries from your users to ensure that the users get the super-fast reporting experience.

Currently the Composite Models do not support LiveConnection sources which only relates to SQL Server Analysis Services (SSAS) Multi-dimensional or Tabular.

Copy data from table and matrix visuals

Coming to Power BI Desktop and the Power BI Service once implemented will be the ability to be to copy data from a matrix or table into another application.

Custom Fonts

You will soon be able to use any fonts that you want in your Power BI reports. All that will be required to work is that the same font will need to be installed on their computer in order for them to see it. If they do not have it installed it will fall back to the default font.

Expand / Collapse in Matrix Visual

As shown below you can see the upcoming option to expand or collapse rows in a matrix visual. There also was the indication that they want to bring more pivot table features from Excel to Power BI.

Expression-based formatting

What Expression based formatting is, is where by using DAX you will be able to format almost anything in your Power BI report. The potential is to use expression-based formatting for the following below and possibly more that I cannot think of

  • Titles of Visuals
  • Line widths of visuals
  • KPIs based colours

From what I did see, there will be an fx button next to almost everything in the visual properties and elsewhere.

Q&A Telemetry Pipeline

This will allow access to the Q&A telemetry to see what the users are using Q&A for, which will allow you to further customize your Q&A Linguistic settings. The data will first be scrubbed for PII data.

Dashboard and Report wallpapers

Coming to both the Power BI Dashboards and reports will be the ability to use wall papers to cover the grey area behind your reports.

Show measures as clickable URLS

As you can see above you will be able to create a link, with a measure so that this can dynamically link to a Power BI Report to any other application which you can access via a URL

Theming over report level and visual container styles

There will be a theming update coming to both report level and visual containers in Power BI. From what I understood it would be similar to the theming that you can currently do in Power Point.

New Power Query Capabilities

There are a whole host of Power Query Updates as detailed below.

Intellisense support for the M formula language

Intellisense will be coming to the advanced editor in Power Query. This is something that I know a lot of people have been asking for. Not only that by Power Query will be coming to Microsoft Flow also.

Smart Data Prep

There are smart data preparation coming to Power Query, with the following initial features below.

  • Data extraction from semi-structured sources like PDF files.
    • This is something a lot of people have been asking for and I have seen it in action and it is awesome, where it can take data out of tables in a PDF and extract it into Power Query.
  • HTML pages.
    • A smarter experience to understand what details you want from an HTML Page.
  • Fuzzy-matching algorithms to rationalize and normalize data based on similarity patterns.
    • This is where it will try and match data based on your columns, to try and guess what the value should be when say the data is miss spelled.
  • Data profiling capabilities.
    • As you can see from the above image, there will be data profiling which will enable you to have a look and see if the data is as expected.
    • An example is if you know that your Customer Number should only be 5 characters long, with the data profiling you will be able to see if it is meeting your criteria.

Power Query Community Website

As with Power BI, there will be a Power Query Website launching later this year.

Certified Custom Connectors

There will be certified custom connectors which will be available to be plugged into Power Query. As part of this process the custom connectors will be certified Currently there are no additional details on how this process will be completed, but no doubt it will explained as time goes on.

Power BI Service

Below are all the updates to the Power BI Service.

Power BI Home

Power BI Home is a new place for users to start their Power BI Journey with the following sections.

  • The Top section will contain the users most important dashboards and reports.
  • The second section will contain their favourite items, as well as most frequently accessed reports and dashboards.
  • Whilst the bottom section will include learning resources.
  • And on the top right-hand side will be a global search where you will be able to search for any item that you have access to in the Power BI Service.

Paginated / SQL Server Reporting Services Reports

As you can see above SSRS or Paginated reports will be coming to the Power BI Service. Not only that but it will also print them out pixel perfect.

Workspaces with Azure AD groups

As you can see above, App Workspaces will be using Azure AD Groups and not dependant on Office 365 groups. You will still be able to add permissions from Office 365 groups, but it will no longer be dependent on Office 365

Data Flows – (Formerly called CDS-A, then Data Pools, now Data Flows)

It started out being called CDS-A, then Data Pools, and now the final name according to the great people in the Microsoft Power BI Team is Data Flows. As previously described this is where you will be able to use Power Query Online to ingest data from anywhere and store them in Entities.

All the data will be stored in an Azure Data Lake Gen2, Pro license getting 10GB per user and Premium will get 100TB per P1 node), which will give you the additional capabilities to be able to let the data scientists in your organisation access the data directly from the Azure Data Lake. You will also be able to bring your own storage within your existing Azure investments.

I think that having the Data Flow will enable organisations to be able to have a single source of truth for their data assets, that can then be leveraged by the entire organisation.

What I do know from attending Miguel Llopis session is that the same runtime that is running in the Power BI Desktop will be running in the Power Query Online in the Data Flows. So that will mean you can use Power Query within Power BI Desktop to get the data in the shape that you want. Then you can go into the Advanced Editor and Copy and paste the data into Power Query Online.

Below is a rough overview of what it looks like

Data Flows Refresh

Not only will you be able to bring data in with data flows, you will also be able to refresh data with incremental refresh which will be a Power BI Premium Feature

Admin APIs

Admin APIs have come to the Power BI Service, which will allow an Admin of the tenant to be able to discover all the artefacts in his Power BI tenant.

This is great for large implementations, because up until now you had to have access to the App Workspace in order to be able to view the data. Now by being an Admin, you will see everything, which is the standard Admin capabilities.

Additional report URL parameter support

Additional report URL parameters will include filters for Date columns, new operators ” < , > , <= , >=” and multiple field values

Commenting in Dashboards and Reports

As shown above there will be the ability to comment on Dashboards and reports.

Not only that but you can include people using the @ which will then send them a notification.

Along with this you can also add comments to a specific visual, which will give great context to comments

Dataset metadata translations

If you have defined translations in the dataset or Analysis Services model, the user will see it in the locale.

Filters for Report Sharing

You will be able to share reports to users with the current filters and slicers in place for when they view the report.

Historical Capacity Metrics

If you have got Power BI Premium capacity, there will be a historical view which will allow you to see what affects performance or refreshes and queries. And see which datasets consume the most memory and make changes or plan accordingly.

Multi-Geo for Compliance

This will be where data must reside in a certain country, where a company operates around the globe. And will ensure that the data can be located in any of the Azure Data Centres, even though the initial Power BI tenant might be located elsewhere.

Not only that but in a future release this can also be used for performance by having the Power BI Premium located closer to the users.

Azure Analysis Services / Analysis Services Tabular

Below are some of the new features coming to SSAS in Azure or On-Premise in Tabular

XMLA endpoint for third-party client connectivity and lifecycle management

By opening the XMLA endpoint for Power BI, any current tool that can connect to SSAS via XMLA will also work with Power BI Desktop. Which means that some of the following tools would work immediately once the XMLA is opened.

  • SQL Server Management Studio
  • BISM
  • Excel

Not only that but you will also be able to use the TOM and TMSL in order to manage and modify configuration settings or items within your Power BI Model.

Application Lifecycle Management

As you can see above there will be the capability to be able to have full Application Lifecycle Management ALM in Power BI Desktop, Azure Analysis Services. This is a great step forward because it gives you the following capabilities

  • Source Control
  • Deployment of specific items
  • Deployments to Dev, Test and Prod
  • Potential to share parts of the data model.

Analysis Services vNext

As shown above this was Christian Wade from the Analysis Services team showing the following potential features coming to Power BI and Analysis Services.

  • Calculation Groups
  • Many-Many relationships
  • Resource Governance
    • Is Available in MDX
    • Query Memory Limitations
    • Rowset Serialization Limits
  • Data Connectivity
    • New Power Query Enterprise Data sources for Spark, Amazon RedShift, IBM DB2, Google BigQuery and Azure KustoDB

On-Premise Data Gateway Updates


There have been a lot of advancements in the On-Premise Data Gateway, with the latest release including Support for Custom Data Connectors in the Enterprise version of the On-Premise Data Gateway.

Below is a list of features coming to the On-Premise Data Gateway

  • Gateway multi-geo support for Power BI Premium
    • With the release of multi Geo Support for Power BI, this will also be enabled in the On-Premise Data Gateway
  • Guarantee high availability of gateways via clustering
    • Better support and visibility for Gateways in a Cluster
  • Improved support for Single Sign On and SAML
  • Improved data source settings experience
    • Here there will be the ability to skip the testing of the connection.
    • Rename data sources.
    • Create multiple data sources with different credentials
  • Tenant level administration of on-premises data gateway
    • This will allow the ability for tenant administrators to manage All On-Premise Data Gateways via the API or GUI
  • Basic traffic load balancing in the on-premises data gateway
    • This will start off with a basic setting to split the traffic requests between Gateways.

Using the Power Function.InvokeAfter to determine how long to wait between API calls

I have been working on a dataset which I will hopefully reveal soon, but part of that was that I was getting rate limited when making an API call.

I found Chris Webb’s insightful blog post (Using Function.InvokeAfter() In Power Query) where he details how to use the Function.InvokeAfter. The one key piece that I personally found missing was how to use this with an existing function that I had created.

I then got another fantastic question from the Power BI Community where they were looking to do an IP Address Lookup. And there are a lot of sites who offer this, but they do limit the rate at which you can query the API (Which I think is perfectly understandable considering they are offering it for free!)

My blog post shows how I ensured that I did not exceed the rate limit for the API using the Function.InvokeAfter

NOTE: I am not going to cover how I converted the IP Address to a location, I have done this previously in (Power BI Query Editor – Getting IP Address Details from IP Address)

Using the Custom Function

I am starting off where I have already created the Custom Function in Power Query Editor. I also have got a table with IP Addresses.

  • I have used a sample file in which I made up the IP Addresses as shown below.
  • I then went into the Add Column in the Ribbon and clicked on Invoke Custom Function
  • This brings up the Invoke Custom Function
    window and I put in the following information as shown below.
    • As you can see from above, I gave my new column a name of Details
    • I then clicked the drop down and selected my function I created earlier called fx_GetIPAddressDetails
    • And then finally the crucial
      part is where I selected
      my IP Address Column.
    • I then clicked Ok.
  • When you do this it returns a table as shown below.
  • Click on the Expand
    Table Button on the top right hand side, which will then prompt you which columns you want to select
  • I then selected Country
  • And below were my results.

Adding in the Function.InvokeAfter to limit the rate at which I query the API

I am now going to modify the step where I Invoke the Custom Function to limit how long it waits between API calls.

  • I created a new Parameter called “Interval (Secs) as shown below.
  • I then went to the following step in my table, and clicked on the Step called “Invoked Custom Function”
  • Then in the formula bar I have got the following.

= Table.AddColumn(#”Changed Type”, “fx_GetIPAddressDetails”, each fx_GetIPAddressDetails([IP Address]))

  • Next, I made the following changes to the above code using the Function.InvokeAfter

    = Table.AddColumn(#”Changed Type”, “fx_GetIPAddressDetails”, each Function.InvokeAfter(()=>fx_GetIPAddressDetails([IP Address]), #duration(0,0,0,#”Interval (Secs)”)))

  • I added the Function.InvokeAfter(()=>
    before I called my function fx_GetIPAddressDetails which is highlighted in BLUE above
  • I then put in the #duration(0,0,0,#”Interval (Secs)”))) which is highlighted in PURPLE above.
    • Within the #duration I also used my Parameter called #”Interval (Secs)”
      which is highlighted in ORANGE.
    • This allowed me the flexibility to change the rate limit timing without having to go into the code.
  • Now when I refreshed the data it will wait 2 seconds between each API Call.

I hope that this has been useful and an easier way to ensure that you can limit how quickly you call an API

As always please leave any comments in the area below.

Here is a copy to the PBIX file that I used in the blog post above: FourMoo – Loading IP Addresses with an Interval.pbix

BI-RoundUp – Power BI (Service & Mobile Update – Create Power BI reports from Excel & CSV Files in SharePoint Online)

Here is the weekly BI-RoundUp, so let’s get into it

Power BI – Service & Mobile Update

As you can see above there now is an option to share a report with the current filter and slicers that are enabled. This is great because it will mean that you can have a subscription report that will send it out every time with the applied filters and slicers.

There is the updated Gateway connections a lot easier with greater visibility to show you what you need to do to get it working.

The On-Premise Data Gateway has been updated to the June Edition of the Mashup Engine.

And finally, for the Mobile Report canvas they have increased the amount of tiles to be larger and longer.

You can find more details here: Power BI Service and Mobile June Feature Summary

Power BI – Create Power BI Reports from Excel or CSV Files in SharePoint Online

I was not aware that there have been updates in SharePoint online, where if you have got an Excel file with a table formatted or a CSV file, there is the option to now Open in Power BI.

This will then open it in Power BI and automatically be connected to your SharePoint Online files. Which in turn means when you update the files on SharePoint online, it will automatically be updated in the Power BI Service without having to use the On-Premise Data Gateway.

You can find the full blog details here: New feature: Create Power BI reports from tables in Excel files and CSV files

Creating a Slicer that also contains a DAX Measure

I got an interesting question from Vijay asking, “How do we do a slicer with data count?”

This is what Vijay was looking to achieve as shown below and I always enjoy a good challenge.

As I always like to do, is to show how I got to the required result.

  • I currently have got data from my website, which I look at daily to see how my blog posts are tracking.
  • In my dataset I like to see where in the world people are coming from to visit my blog or website.
  • Based on the requirement from Vijay I created a slicer which takes the total sessions per country, which I can then use as a Slicer on my data.

The first thing that I did was to create a calculated table which will have the information I require for the Slicer.

In Power BI Desktop I went to the Modeling Ribbon and clicked on New Table

This will be the Country and Sessions. I created it with the following DAX Syntax below.

Slicer Table =
    ADDCOLUMNS (
        SUMMARIZECOLUMNS ( 'All Web Site Data'[Country] ),
        "Sessionszz", [Sessions]
    )
  • Line 1
    • What I have done above is created a table called Slicer Table
  • Line 2-3
    • This is where I added the ADDCOLUMNS Syntax for my table.
    • NOTE: Thanks to Maxim for commenting and letting me know that I did not need the original CALCULATETABLE
  • Line 4
    • I then used the SUMMARIZECOLUMNS DAX function and put in the ( ‘All Web Site Data'[Country] column, as per my requirement to get a Count of Sessions per Country.
  • Line 5
    • This is where I created my Column Name called “Sessionszz” and my measure called [Sessions]
    • NOTE: When I use measures I only use the Square brackets.
  • Line 6-7
    • I then close off my previous DAX functions.

The result is I now have the following calculated table.

How I had the data in order to create a new calculated column which will have the Country with the Total Sessions. I did it with the following DAX Syntax below.

Country with Sessions =
'Slicer Table'[Country] & " ("
    & 'Slicer Table'[Sessionszz]
    & ")"

 

And the result was I now had my new column in my table showing both the Country and the Total Sessions

Next, I created a relationship from my Fact table ‘All Web Site Data’ to my new calculated table called ‘Slicer Table’ on the Country Column.

I went to the Modeling tab again, and this time clicked on Manage Relationships

I then clicked on New and selected the following as shown below.

I then click Ok and Ok again to come back to Power BI Desktop

Now I was able to create the Slicer, which shows the Country and the Total Sessions.

I have selected the Country “Afghanistan” which has got a total of 4 sessions, and in my table, I can see the sessions and the date when they occurred.

Each time the dataset is refreshed the calculated table will also be refreshed which will ensure that the slicer values are up to date.

This was a great exercise and I personally think something quite handy to have when slicing data.

As always if you have any questions or comments please leave them in the area below.

BI-RoundUp – Power BI (Developer Update for June – On-Premise Data Gateway Update for June – Securing your connection between Power BI & Azure SQL Database)

I must admit that I have been a little quiet with regards to my BI-RoundUp and it is partially due to being extremely busy working. As well as preparing for SQL Saturday Sydney and my presentation at the Business Applications Summit in Seattle at the end of July.

As they always say, the show must go on, so here is my latest BI-RoundUp

Power BI – Developer Update for June

If you are using Power BI Embedded or the developer features of Power BI, there have been some recent updates.

Embed Capabilities

You can now set the slicer values through the Javascript API. This means that when the report loads it can have the slicers pre-set.

As shown in the image above, you now can use themes in embedded dashboards.

In the playground tool (which I suggest everyone go and have a look at), it is now a lot more interactive in terms of it now being able to show “Dynamic Report Layout” and “Capture and share Bookmarks”

Automation & life-cycle management

The documentation for the Power BI REST APIs has been updated in terms of their documentation which is auto generated from Swagger files. I had a look and I do like the look of how it all works.

Power BI Embedded in Azure

There is a note that Power BI Workspace collections are going to be depreciated will no longer be available.

And finally, the Custom Visuals support report themes.

All the details from the blog post can be found here: Power BI Developer community June update

Power BI – On-Premise Data Gateway Update for June

There is an update for the On-Premise Data Gateway, which includes a lot of bug fixes and improvements.

It also includes the June version of the Mashup Engine that is currently found in Power BI Desktop.

Here is a link to the blog post: On-premises data gateway June update is now available

Power BI – Data Gateway Update for June – Securing your connection between Power BI & Azure SQL Database

If you are currently getting data from Azure SQL Database, there is an option to “Allow access to Azure Services” which allows any Azure Service to be able to contact your Azure SQL Database.

In some scenario’s this is not secure enough.

In the link below it explains how to secure the connection between Power BI and your Azure SQL Database so that it can only be accessed by the On-Premise Data Gateway.

There is quite a lot to go through, which is detailed in the blog post: Securing the connection between Power BI and Azure SQL Database