Power Pivot and DAX in Power BI
Introduction: Something got me thinking the other day when I used the Google Analytics Connector and saw what looked like to me was a Power Pivot Model, as well as an image. I know in the current Power BI Designer as well as when you import an Excel file into Power BI on the web front end, you do not get to see these options. So it got me thinking, how is Microsoft doing this?
After some playing around I found a simple and easy solution!
NOTE: This does not currently work with Excel 2016
What this enables you to do, is to have your entire Power Pivot Model, along with your DAX calculations, as well as the synonyms within your Power Pivot Model available in Power BI!
Below is a screenshot of my completed dashboard, after which I will explain how I did it, and then an example with the Power Pivot Model, DAX calculation, Image as well as a synonyms!
I have used data from the AdventureWorksDW2014 database to get data into my Power Pivot Model.
How to get Power Pivot, with DAX calculations and Synonyms into Power BI
You guy are going to love how simple this really is to get completed.
-
Create your Power Pivot Model, DAX Calculations and if required your synonyms.
- NOTE: You can load your data from Power Query into your Data Model (which is Power Pivot)
-
Then what I did was to first create a really simple
Pivot Table with a chart. -
Next I then created a Power View report, by going into the Insert
Ribbon and then clicking on Power View, after which I created my Power View Report as shown below - Then I saved my Excel Workbook.
-
Next I uploaded the Excel Workbook to Power BI.
- NOTE: I uploaded it directly from my PC, as well as from One Drive for Business and they both achieved the same results.
-
I had the following while it was being imported
-
Now before I go on, I wanted to show you what my Power Pivot Model looked like in Excel.
-
From the above screenshot, you will see that I have created two DAX
Calculations.-
Sales Amount
- This is just a sum of the SalesAmount
-
PM Sales
- This is a DAX
Calculation that I found in http://www.daxpatterns.com/time-patterns/ - I then used this and applied it to my data.
- This is a DAX
- NOTE: The two DAX Calculations above is to show that they can then be used within Power BI
-
-
-
Now once I had uploaded my Excel
Workbook I went into the report in Power BI and saw the following:- As you can see above this is identical to my Power View report in Excel.
-
Then if I click on Edit Report, I see the following in Power BI, as you will notice below, I added an additional Combo Report, using the Sales and PM Sales amount.
-
Which as you can see above, is my original Power View report, but added an additional chart, using the DAX Calculations from my Power
Pivot Model. - NOTE: You can see that it has my DAX Calculations of Sales Amount and PM Sales available and ready to be used.
-
- As you can see from above, you can now have a fully functional and working Power Pivot Model, with most of the Power Pivot features such as DAX Calculations and Synonyms available to be used with Power BI!
- So in a nutshell all that you need to do is to add a Power View report within your Excel workbook. Which will then enable the Power Pivot model to be available in Power BI
For the Synonyms to work, I simply added them within my Power Pivot Model, under the Advanced tab.
Adding an Image for Power BI from Excel
- To get the image embedded, I simply added it to my Power View Report in Excel.
- Then once I uploaded my Excel Workbook, I could then Pin the image to my dashboard.
In future blog posts, I will explain how I got Dashboards working when they are not created automatically in Power BI.
Link to Excel File
Below is a link if you want to use my Excel File and then upload it to your Power BI site
Please note, the only reason for the image for my blog, is I had to put in some type of image and I could not think of anything else to put in there!
[…] https://gqbi.wordpress.com/2015/04/20/power-pivot-and-dax-in-power-bi/ […]
[…] from my previous blog post POWER PIVOT AND DAX IN POWER BI , I know that DAX is already supported in Power […]
[…] is related to my blog past that I created earlier this week (Power Pivot and DAX in Power BI). And it was amazing to see that later on in the week there was a Power BI Designer update which now […]
[…] Power Pivot and DAX in Power BI […]
Gilbert,
Thanks for sharing this. I was not able to get the link to your Excel file. Power BI Power Pivot Example. Is it still available?
Hi Robert, the link still works.
If you cannot download it from OneDrive let me know and I can always email it to you?
Just a side note in that this blog post is over 2 years old and a lot has changed with Power BI and Power Pivot since then.