PowerPivotPro

PowerPivotPro is Coming to Phoenix

February 20 - 22, 2018

Registration for 2018 Public Training is now open!

AVAILABLE CLASSES

**Use the discount code “3ORMORE” when signing up 3 or more people.

FEBRUARY 20 - 21

Foundations: Power Pivot & Power BI

Instructor: Kellan Danielson

Super charge your analytics and reporting skills with Microsoft’s dynamic duo. Designed to handle huge volumes of data, these tools will transform the way you work! Two Days in our class and you are EMPOWERED!

  • Learn Microsoft’s secret weapon behind Power Pivot & Power BI: DAX
  • Taught by Kellan Danielson – PowerPivotPro Partner and Vice President of Client Services
  • You don’t need to be an IT professional – most of our students come from an Excel background

FEBRUARY 20 - 21

Level Up Series: Advanced DAX

Instructor: Ryan Sullivan

The Advanced DAX Course was such a hit in the first half of 2017 that we’ve expanded the course to 2 days!

Overview

  • This advanced DAX training class is taught completely in Power BI Desktop.
  • Students are encouraged to take our Foundations course and have hands on experience with the DAX language.
  • Taught by Ryan Sullivan – Principal Consultant.
  • Class material drawn from usage of Advanced DAX applications while consulting with hundreds of international firms.

FEBRUARY 22

Level Up Series: Power Query for Excel & Power BI

Instructor: Krissy Dyess

The second class in the series is our Level Up Series is Power Query for Excel & Power BI.

  • Students are encouraged to take our Foundations course and have hands on experience with Power Query in Excel or Power BI Desktop.
  • Taught by Krissy Dyess – PowerPivotPro Principal Consultant and Phoenix native!
  • We will cover common to unique business challenges made easy with Power Query’s data wrangling capabilities.
  • Intermediate to Advanced Level Power Query best practices distilled into easy to understand patterns to apply to your most common business challenges.
PowerPivotPro Logo

Guest post by Lars Schreiber

Hello PowerPivot Community,

I’m quite sure most of you know a scenario comparable to the one in the following figure:

Bringing two fact-tables with different date-columns together using a 'unique-months'-dimension

Two scenarios (in two tables) – in this case actuals and budget – have to be put together to do some math on them. The only problem you have is the different level of planning regarding the time dimension. While the actual figures are on daily basis, the budget was planned on monthly basis. As you could learn on this website many times before (e.g. here) you need another lookup-table with a unique list of months to bring both tables (actual & budget) together. And this is where Power Query can help you a lot.

Two ways to get your list of unique values without using Power Query

  1. Take a hardcopy of this unique-list into an excel-sheet and link this list into your PowerPivot-model
  2. For those of you, who are familiar with SQL and databases, use a database to import the table ‘Dim_Time’ and put a view/ query on it, using ‘SELECT DISTINCT’- or ‘GROUP BY’-statements and connect your PowerPivot-model to that view/ query to get the table ‘Dim_UniqueMonths’.

Version 1 needs no database-professional and no database-license, but the list of unique month-values isn’t dynamic. A change in your input data has no effect on the PowerPivot-model. This is why Version 2 should be preferred. Putting a query on dynamically changing data secures that you always have the correct list of unique values. BUT you need a database and someone (if not you) who knows to deal with it.

Get your dynamic list of unique values with Power Query

Power Query offers a third version to get your unique list of lookup-data, which combines the positive effects of version 1 and 2:

After you installed Power Query on your Computer (download available here) you can import data from a huge amount of different data sources.

Importing csv-files with Power Query

Next import the csv-file ‘Dim_Time’, which has all the required months, but not unique as you need it.

Power Query automatically splits up the csv-file into different columns. For your PowerPivot-model you want to have a unique list of months, so you have to delete all the other columns from the imported csv-file, before you can start to remove the duplicates. Therefore just mark the month-column (the only one you need), do a right click into the header and choose “Remove Others”.

Removing all unimportant columns from the import file with Power Query

 

Now remove the duplicates and give the query a meaningful name (e.g. ‘PQ_UniqueMonths’). To rename the query just change the name under ‘properties – name’.

Remove duplicates with Power Query


Interested in Learning How to Do this Kind of Thing?

power query

Our New Online Power Query Course just launched this year. You’ll learn Power Query from the best in the business, two Excel MVPs Ken Puls and Miguel Escobar. We’ve included 7 Hours of Self-Paced Video over 31 Courses, with lots of example files, and a Digital Badge powered by Acclaim.

CLICK HERE to claim your spot.


Now you’ve got everything you wanted. Before you save the query, go under properties and deselect ‘load to workbook’, because you don’t need the data within the Excel sheet. You want it directly in your PowerPivot-model.

Back in your PowerPivot-window go to ‘Existing Connections’ and choose your defined Power Query-query ‘PQ_UniqueMonths’. Then press ‘Open’ and PowerPivot will import these data into a new sheet within your PowerPivot-model. Give this sheet a meaningsful name (e.g. ‘Dim_UniqueMonths’) and link it to the other tables as shown in the first figure of this post.

 

Using Power Query as dynamical data source for your PowerPivot-model

From now on you simply have to refresh your PowerPivot-model and the unique list of months is always up-to-date.

Power-BI rocks. Smiley

  Subscribe to PowerPivotPro!
X

Subscribe

This Post Has 3 Comments

  1. That’s awesome 🙂 I like that there is no M code in the whole article.

    I can’t but think how great it would be if Power Query was able to query SSAS (MD and Tabular), the current worksheet model and other worksheets models (preferably without Sharepoint needed).

  2. Hello. When I do this it imports the whole file into a worksheet but I don’t see any options that say “remove others”.

Leave a Comment or Question