DAX – Getting the Start Date of the following Week

I was recently doing some work for a customer where they wanted to compare their date to the start date of the following week. They also had a requirement to persist the data to the dataset.

I thought that this would be a good challenge to use DAX with a calculated column. I most certainly could do this using the Power Query Editor and M, but I always like to see if it is possible when it is a smaller and easier DAX calculation.

Below is the DAX to get the Start date for the following week

'Date'[Date] - WEEKDAY('Date'[Date],2)+8

As you can see below, as each week goes on, I have got the start date for the following week for each day of the current week.

If I wanted to change it and use the starting date of the current week and use it for all dates for the current week, I could change it with the following DAX calculation

'Date'[Date] - WEEKDAY('Date'[Date],2)+1

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

BI-RoundUp – Power BI (Sep Update for Power BI Desktop – Dashboard Comments – Community Contribution to PowerShell Cmdlets – Power BI PowerShell Cmdlets available in Azure Cloud Shell)

Welcome to another week of my Power BI Round Up. And as expected there is another massive Power BI Desktop Update.

Power BI – September Update for Power BI Desktop

As always I am going to over the new features and highlight what I think is really relevant in terms of what has been released.

Reporting

With the added support for categorical fields on the X-Axis this now makes the scatter charts more flexible.


As shown above there now is the capability to be able to copy a single value, which will copy the value in its unformatted form, which could be used to put into a search of another application.

Whilst when using the Copy selection feature, it will copy everything that you have highlighted in your table or matrix. And when pasting this, it will keep the column headers as well as the formatting options which you can then paste into Excel or another program. This is really a great piece of functionality which makes it easier when certain data needs to be copied into another system.

There are now some built in report theme’s which are great for those people who just want to move from the default colours, but do not want to create their own custom themes.

Report Page Tooltips are now generally available meaning that you will not have to enable it as a preview feature.

Along with that as shown above there is now report page tooltips available for Cards.

There have also been additional improvements for accessibility in the formatting pane, making it easier to navigate, as well as when using the screen reader there is more support.

Analytics

This is a really big, BIG one having the ability to have aggregated tables in your data model. What this means is that you can have a highly aggregated table of your data which might answer 60 – 70% of the queries. When the queries are run they will use the data in the aggregated table, which in turn results in exceptionally super-fast query response times. And if it does not hit the aggregated table it will then go down to the source table, which could be imported or using Direct Query mode, which means then that the entire data model is actually very small but very fast.

There is a lot more to this, so I suggest reading up the documentation that is included in the blog post. But this is something that I have been waiting for and cannot wait to try it out and get it working.

Finally there is now support for RLS with Q&A, this means if you have had a dataset that has had Row Level Security (RLS) previously you could not use Q&A. This has now been fixed and Q&A is available which is awesome.

Data Connectivity

As shown above there is a new connector where you can connect to PDF files and it will attempt to extract table data from your PDF files.

There is now support for the SAP BW Connector measure properties

There is a new connector called dataflows which will soon be in limited preview which will allow users to connect to an existing data flow.

Data Preparation

As per my first image, and above, there is now Intellisense when going into the Advanced Editor in the Power Query Editor. This is so awesome. There have been so many times in the past when I have not known which M function to use. As well as having syntax errors, and a lot of that pain is now gone with having Intellisense.

The add columns from examples now supports text padding your data, as shown above you can pad the text with zeros for data where you want them all to have the same length.

It is interesting to see that right at the end of the blog post they highlighted that they are working on being able to copy visuals between PBIX files. How cool is that??

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

Power BI – Dashboard Comments

This was announced at the Microsoft Business Applications Summit and it is great to see that you now can add comments to Power BI Dashboards, as well as individual tiles on the dashboard.

It is also great that you can tag people in the comments, which will then send an email or send a push notification to the Power BI Android and IOS Mobile App.

At the end of the blog post, they also indicated that this will be coming to the reports, so stay tuned.

You can find all the details here: Announcing Dashboard Comments in Power BI: Your new hub to discuss data and collaborate with others

Power BI – Community Contribution to the PowerShell Cmdlets

This is the first contribution from the Power BI Community which adds to the existing Power BI PowerShell management cmdlets. Where Kenichiro Nakamura has added functionality to work with datasets, tables and columns.

You can find a lot more detail in the blog post: Celebrating our first community contribution to the Power BI management cmdlets

Power BI – PowerShell Cmdlets available in Azure Cloud Shell

What this means is you can now use the Azure Cloud Shell to run the Power BI PowerShell Cmdlets. This also means that there is no need to try install and configure the required PowerShell modules, because this is all maintained in the Azure Cloud Shell.

I would suggest looking into the storage options because depending on how much storage you need, if you have an existing Azure Subscription this could be a very good option.

You can find more details on how the Azure Cloud Shell works, as well as the blog post details here: Power BI Management cmdlets in Azure Cloud Shell

BI-RoundUp – Power BI (New Monitoring Capabilities for Power BI Premium – Developer Update for August – Webinar on New Power BI Tools)

Welcome to another week of the BI-RoundUp.

Power BI – New Monitoring Capabilities for Power BI Premium

As you can see above there now is an App which you can get for Free from the App Source which will get all your capacity metrics which you can then use to better understand how you and your users are using your Power BI Premium Capacity.

There was also an indication that additional metrics will be added such as Long Running Queries and Query Duration, which is great to see if there are particular queries which could be consuming CPU and memory.

If you are using the A SKU’s for Power BI Premium you can also use the above App to analyse your capacity.

All the details can be found here: New monitoring capabilities for Power BI Premium Capacities

Power BI – Developer Update for August

Power BI Embedded in Azure

As you can see above, there are once again a whole host of great improvements to the Power BI Development story.

There is now Multi-Geo support for ISV’s who require their customers data to be located in their specific regions.

Power BI Embedded is now integrated with Azure Diagnostics, which helps with better diagnosis of resource issues and what is the root cause of these issues.

As per the request from a lot of users, there now is the QPU metric available when using Power BI Embedded.

Embed Capabilities

Now you can create a customized error notification for your end users when your App is embedded, so that the users do not get confused when there is an error.

There is now a more detailed and indicative error message when you are developing your app, which should make the entire development experience that much better.

There is now also a new updated Power BI Embedded playground which is more integrated and shows you how to leverage the JavaScript API

And finally, you can now use the Power BI Rest APIs to integrate with the new App Workspace experience, which is great as it moves away from the tight integration with Office 365 groups

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

Power BI – Webinar on new Power BI Tools


Seth and Mike will be hosting a webinar with Chuck Sterling from the Microsoft Power BI Team where they will go through their wonderful tools that they have developed on www.powerbi.tips

I use a fair few of their tools, so this will be a great webinar to watch.

Details can be found here: 9/11 Webinar: New Power BI tools and new templates including a walkthrough of Cool Blue and the layout Purple Haze

What runs under the cover when I open Power BI Desktop

I am always interested in what happens under the covers when I open Power BI Desktop. So I did a little digging and I got the inspiration from Macro Russo when he did his Webinar as well as presented at the Queensland Power BI User Group on “My Power BI report is slow: what should I do?”

What happens when I click on Power BI Desktop.exe?

This is the list of associated processes that are opened when Power BI Desktop is started, which I will explain what they are below.

This is what it looks like for me when I am running Windows 10 and I have a look in the Task Manager under Processes

  • CefSharp.BrowserSubprocess
    • Because Power BI Desktop runs in the Power BI Service, which is essentially a website and all the visuals are rendered in a browser.
    • My understanding is that within Power BI Desktop it is simulating how it will run the Power BI Service.
    • As per Marco’s Webinar, if this consumes a lot of memory or CPU this is potentially why your Power BI Report is slow.
  • Console Windows Host
    • UPDATE (06 Sep 2018) – I got a reply from Amanda Cofsky from the Microsoft Power BI team, who said that the Console Windows Host is the “Analysis Services Engine Console Output”, which is generally used by the Microsoft Engineers for debugging purposes.
  • Microsoft Mashup Evaluation Container
    • This is the Power Query Engine.
    • This is responsible for processing all the steps in the Power Query Editor. Which gets data from my sources, transforms it and then loads it into my data model.
    • When I look at a Server where I have got the On-Premise Data Gateway installed I will see a lot of instances of the Microsoft Mashup Evaluation Container running. This is because this is where my data gets loaded and transformed into tables before sending to the Power BI Service.
    • This is the executable which is the starting point and container for all the processes that are run within Power BI Desktop.
    • This is where all the magic happens, it is an analytical data engine which leverages In-Memory technology to achieve incredible compression using the X-Velocity Engine and blazing fast query response times by loading all the data into memory.
    • This is where all the data gets loaded from Power Query into the data model.
    • This process can have the highest memory usage.
    • If I have an expensive DAX measure which must get most of its data from the storage engine I will see an increase in memory utilization and CPU during the evaluation and running of the DAX measure. Which once again as per Marco’s Webinar is a great indicator as to why my Power BI Report is slow.

I hope that this has given you some insights into what runs under the cover in Power BI Desktop and that there are quite a few moving parts that work together seamlessly to make the report creation and development experience so seamless and fast when developing Power BI Reports.

As always if there are any questions or you have more details and insights into the details above, please let me know and I will happily update the details in this blog post.

Thanks for reading!

BI-RoundUp – Power BI (On-Premise Data Gateway August)

This week has been rather quiet, but I have a feeling that if Power BI Desktop gets released next week, we will be back at it and have a whole host of updates.

Power BI – On-premise Data Gateway Update for August

In this month’s update there is additional improvements for Custom Data connectors.

And it also has got the August version of the Mashup Engine.

You can find all the details and content here: On-premises data gateway August update is now available

That is it for this week, short and sweet!

BI-RoundUp – Power BI (Report Server Update – Aug 2018 – Ask a Question Generally Available – URL Filter Improvements – Python Episode 1 – Multi-Geo Support for Power BI Embedded)

Here is the weekly roundup, and as always the Power BI team has been very busy over their summer releasing some incredible features.

Power BI – Report Server Update Aug 2018

I am not going to go through all of the updates to the Power BI Report Server, due to almost all of the functionality already being released in Power BI Desktop and the Power BI Service.

What I will say is that there is a lot of new features that have been released. And as at the time of the release it almost has parity with the August release of Power BI Desktop. This is once again an incredible effort by the Power BI team to get this all out.

Below are all the updates with links to the specific sections, and if you do use Power BI Report Server, I would suggest reading through the blog post.

 

REPORTING

Persistent Filters (Reset to Default) now works with Custom Visuals in the Power BI Service

I was pleasantly surprised today whilst working on an older Power BI Report which had a few Chiclet slicers, and when I changed the selection of the Chiclet slicer I got the option highlighted “Reset to default”

I was actually so excited that I created this blog post on the way home from work, I simply could not wait until tomorrow!

Now when I hover of the “Rest to default” it now has a different tooltip, which now says:

Previously it said the following below:

I then created a quick report and configured it with my favourite Custom Visuals which are from the Filter Category.

  • Standard Slicer
  • Text Filter
  • Chiclet Slicer
  • Hierarchy Slicer
  • Smart Filter –  NOTE: The smart filter works but appears to not display the value when coming back to the report.

The results were fantastic in that each and every Custom Visual now works with the Persistent Filters.

As always, I really enjoy the comments and suggestions that I get to my blog posts. So please leave them below.

BI-RoundUp – Power BI (Working with PowerShell in Power BI – Deprecation of Custom Visuals API 1.1)

Here is the weekly BI-RoundUp and at least this week it will be a quick read!

Power BI – Working with PowerShell in Power BI

I am not going to go into great detail here, due to Kay giving a detailed explanation how to use the PowerShell cmdlets.

What I will say is that after reading through the above blogpost and with the Power BI Team creating the PowerShell Modules, this means that you can install the module for Power BI, which will then allow you to leverage all the module items. I have been using PowerShell for a while and having the modules is a lot easier to use and get out the data you want.

I suggest reading through the blog post below, as I am certain there is something you will learn and can use in your organisation.

Blog Post link: Working with PowerShell in Power BI

Power BI – Deprecation of Custom Visuals for API 1.1

As shown above there will be a deprecation of support for the Custom Visuals API version 1.1

This will happen from 01 September, so I suggest people who have got old Custom Visuals read this blog post with the links on how to upgrade their Custom Visuals

Here is the blog post: Announcing the deprecation of custom visual’s API version 1.1 and older

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