top of page

Power BI Workaround – Drill Through Reporting in Power BI

Updated: Nov 14

SO far I have seen many Power BI usage metrics demo’s or read blog posts about usage metrics, but not looked in detail. Recently I started exploring App Workspaces to create some standards for how to design, publish and collaborate with Power BI reports. In that process, I thought to look at Report Usage metrics By presuming I will be able to get Power BI Reports metadata. I don’t think it benefited for what I was looking for, but I saw Report GUID!  I remember seeing this before when I was working Filters in Power BI Report URL.

Screenshot 1 of 14 showing power workaround drill

By looking at the URL I thought, I could use the URL for Click Through and Drill Through.  So I started exploring to see if there's any possibility of Drill Through functionality. In a nutshell, Yes! You can just point to a report URL from Power BI Report and it will open that report when you click on it, like Click Through. If you also give filters like mentioned here – Https://powerbi.microsoft.com/en-us/documentation/powerbi-service-url-filters/, it can work as Drill Through too. That gives you an idea, however, If you want to see what other things I explored or did with this then carry on reading…

Drill Through Reporting in Power BI:

Screenshot 2 of 14 showing power workaround drill

By looking at my Report URL, I can see It formed with few Id’s, which looks like GroupID, ReportID and ReportSection. Getting GroupID and ReportID is doable but what's this ReportSection? Report Section, it does have a pattern, the very first tab is Report Section, the second one is Repost Section 1 and goes on. Oh Yeah, I also understood that I better call each tab as Report Sections than tabs. (Group ID are Office 365 Group Id’s, and Report ID’s are available through Power BI Usage Metrics)

Even if you understand Report section was based on the position, it could be a bit tedious process to figure out the position of Report Section. It isn't the position; it’s based on which section created when. At this point, I could easily guess, this info hidden somewhere in Power BI files.

Report Section:

One of my good friend Malden, who is also very talented, once showed me how easily he was getting content from Excel by renaming as zip, he also mentioned it works with many Microsoft applications. So I thought to rename Power BI file to Zip file. For my convince after unzipping, there was a welcoming folder called Report.

Screenshot 3 of 14 showing power workaround drill - report section

Inside Report folder, there were two files

Screenshot 4 of 14 showing power workaround drill - report section

By opening these files in Notepad, I noticed Layout was a Json file type, and  LinguisticSchema was XML. Also, these two files have some information about Reports.

Screenshot 5 of 14 showing power workaround drill - report section
Screenshot 6 of 14 showing power workaround drill - report section

One useful tool I knew which could pull data from these file types is Power BI. Naturally, I renamed files with respective file types and started importing into Power BI.

For both of them, I got an error. I thought something wrong with the file format. Then I checked both files with XML Format Checker and Jason Format checker. Both of them were fine. However, when I copied content from those files and saved as new copy using Notepad, they were ok to import into Power BI desktop. (

Screenshot 7 of 14 showing power workaround drill - report section
Screenshot 8 of 14 showing power workaround drill - report section

Once I imported data into Power BI, I found a new terminology called POD. Each Report section was called like PODx. It might be some programming terminology, which I don’t know. Whatever, after bit of clean up this is how data in my queries look like

Screenshot 9 of 14 showing power workaround drill - report section
Screenshot 10 of 14 showing power workaround drill - report section

I can join these two queries to get which Report belongs to what section.

Screenshot 11 of 14 showing power workaround drill - report section

At this stage, I can easily create URL using GroupID, ReportID and RepostSection. To make it bit more interesting (at least for me ), we can use query parameters to get ReportID and GroupID.

Using query parameters to create Drill Through URL:

I created two parameters one for GroupID and one for ReportID. Then I created two queries by returning those parameter values so that I can use them for my Drill Through URL and edit parameters from the designer.

Screenshot 12 of 14 showing power workaround drill - using query parameters

Then I created a calculated column under Layout Query

ReportURL = "https://app.powerbi.com/groups/"&MAX(GroupID[GroupID])&"/reports/"&MAX(ReportID[ReportID])&"/"&'Layout'[ReportSection]

Another calculated column as follows to form a full URL with filters

RegionURL =
Var RegURL = CALCULATE(MAX(Layout[ReportURL]),Layout[Report Name]="Region")returnSUBSTITUTE(RegURL&"?filter=Schools/Region eq '"& CALCULATE(MAX(Schools[Region]))&"'"," ","%20")

I have a drill through URL for each Region.

Screenshot 13 of 14 showing power workaround drill - using query parameters

And, I can create a report like below to drill through on each Region

Screenshot 14 of 14 showing power workaround drill - using query parameters

And it works 🙂

But what if you want to drill through to an app?

Drill through to a published App:

In the above URL, we've AppID and ReportID; ReportID is same as App Workspaces. Just instead of GroupID, we need to use AppID and small changes in the URL. I didn’t manage to find a way to query AppID other than copying from URL.

To the PowerBI Model, we can add another Query Parameter saying APPID, and change Drill Through URL based on the sharing. I don’t want to make this post any longer If you want, I'm sure you can write that DAX expression.

Summary:

The basic question, does anyone want to do it? May be No! One benefit I can see is, when Microsoft bring Drill through functionality into Power BI, it could be limited to work with in a model or with in a Workspace. But this way we can point to Any URL in any workspace. Another benefit for me, it's nice to know how Power BI Service URL was structured and few other things like Report folder in Power BI file and knowing Report Section terminology 🙂

In summary, if you have a burning Drill through the problem, then this could be handy. Few quick points, works only in Power Bi Service. Filters doesn't work with Public publish. There's no Back button like we expect with any drill through functionality. You can point to any report in any workspace. When you click on the URL, it opens a new window/tab for each URL. It was slow for me but it could be just my internet connection. If you have more than one report, then you can use Usage Statistics and get ReportID for all reports. I'm sure there must a way to get Office 365 group ID’s using Power Shell.

To be frank, very soon Microsoft is going to release Drill through functionality, so there's no point of going through all this pain other than if you love looking into Power BI files 🙂

Prathy 🙂

Comments


bottom of page