Tip – Import Data from PowerBI.com

Last week I presented a session Power BI Tips & Tricks from the Trenches at Data & BI Summit in Dublin.

One of the tips was on how to “Get Data from PowerBI.com”:

My colleague Joana Barbosa wrote a step-by-step blog post on how to do it:

http://binarylies.ghost.io/importing-data-from-another-power-bi-service-dataset/

Check it out!

As Joana said, this is not supported by Microsoft, but I’m sure it is very useful 🙂

Cheers!

Advertisements

Slides of “PUGML06–#PowerBI Tips & Tricks from the Trenches”

The slides for my presentation “#PowerBI Tips & Tricks from the Trenches” at #DataBISummit today are available for download here.

image


Thanks!

Convert a Power BI Desktop report from Import to Live Query

Recently I came across this great blog post from Dustin Ryan on how to convert a Power BI Desktop File from Import to Live:

https://sqldusty.com/2018/01/30/converting-a-power-bi-desktop-file-from-import-to-live-query/#comments

But I’ve been using another technique that is very simple and don’t require any external tools, you just need to execute 5 simple steps in Power BI Desktop:

1. Open the PBIX with Power BI Desktop

2. Open the “Query Editor”, select all the Queries and click on “Delete”:

image

3. Click on “Close & Apply”:

image

And you will end up with something like this:

image

4. Now click on “Get-Data” and “Analysis Services”:

image

5. Write down the Analysis Services (or Azure Analysis Services) server address, Database Name and click on the option “Connect Live”:

image

And that’s it!

If your Analysis Services model has the same fields and measures the report will work just fine and now your PBIX is converted from “Import” to “Live”:

image

Power BI Custom Visual–Filter by List

Do you ever got this request from a customer:

“Is it possible to filter a Power BI report with a list of 100+ items? Do I need to pick one by one on a slicer?”

We do and because of that DevScope team built a custom visual to ease that pain: “Filter by List

image

This visual is very simplistic but also very powerful and very simple to use:

  • Add the visual
  • Select a field
  • Paste/Write a collection of items
  • Filter, the custom visual will filter the report page with all the items that “match”

See this video to learn more:

Export Power BI Desktop data to CSV Files

A few months ago I published a PowerShell module called PowerBIETL that allows you to export all your Power BI Desktop file data to a SQL Server database:

https://ruiromanoblog.wordpress.com/2016/04/21/use-power-bi-desktop-as-an-etl-tool/

Just updated the module to support export to CSV Files:


Install-Module PowerBIETL

Import-Module PowerBIETL

Export-PBIDesktopToCSV -pbiDesktopWindowName "*PBI Window Name*" -outputPath ".\Output"

After running the powershell code above you will end up with a CSV file for every table on your Power BI Desktop file:

image

Thanks to Rui Quintino for the draft code and Josh Close for creating the amazing CSVHelper!

Automatically Export PBIX’s using #PowerBIPS

Ever wanted to export all your Power BI reports from a workspace and save a copy without manually going to each one and select the “Download report” option:

image

My team at DevScope just updated the PowerBIPS powershell module with a simple cmdlet to do just that:

Export-PBIReport –destinationFolder “<local folder>”

With an easy PowerShell script you can download all the reports from your PowerBI workspaces (ex: Backups?):



Install-Module PowerBIPS

# Get the Auth Token

$authToken = Get-PBIAuthToken 

# Define the Workspace you want to download the reports from - Optional, by default downloads from personal workspace

Set-PBIGroup -authToken $authToken -name "Demos - PBIFromTrenches" -Verbose

# Downloads the reports to a destination folder

Export-PBIReport -authToken $authToken -destinationFolder "C:\Temp\PBIReports" -Verbose

Azure Analysis Services Tracer (aka AzureASTrace.exe)

Recently we had the need to analyse the queries made by the users on Azure Analysis Services and to cross reference that data with Azure AS metrics. For example to see exactly which queries are the cause for high QPU’s or Memory and see who made them on which application.

Currently Azure AS allows you to configure an Extended Events session to collect events from your Analysis Services database:

image

But there’s no easy way to export or save that data to do some further analysis. You can only watch live data and it’s not very user friendly:

image

We tried to use the good old ASTrace but it’s not compatible with Azure Analysis Services and it’s not a very good practice because it basicaly create a Profiler Session that will be deprecated soon.

Because we desperately needed to analyse the user queries to identify bottlenecks my amazing BI team at DevScope build an great tool called “Azure-As-Trace” that will allow you to point to a Analysis Services Instance and instantly start collecting the events you want and store them in the file system in JSONL format.

You can download it or contribute to it at github: https://github.com/DevScope/Azure-AS-Tracer

It’s very simple to use you just need to download the binaries and change in the config file ‘AzureASTrace.exe.config’ the following parameters:

ConnectionStrings/AnalysisServices The connection string to the Analysis Services instance you want to monitor
AppSettings/XEventTemplateFilePath The path to the XEvents trace template to create the monitoring session on the Analysis Services Instance
AppSettings/OutputFolder The path to the Output Folder that will hold the JSONL files

image

After that you have two options:

  • Run AzureASTracer as a console application, by simply executing AzureASTrace.exe

image

  • Run AzureASTracer as a windows service by running ‘setup.install.bat’ and start the service

image

Either way when running the events will be saved on this on the Output folder, AzureASTrace will create a file for every Event Type subscribed and group the files by day:

image

Now you can analyze those events in Power BI (comming soon) very easily…