When Ken was at the Microsoft Business Applications Summit a few weeks ago, he met Mr. J.A. Garcia who has been doing some amazing work with Power Query. We wanted to share his story about how he has been using Power Query in helping with disaster recovery efforts in Puerto Rico:
"[In] my line of work there's been two defining moments that have changed the way we look at our tools. The first one was the Zika outbreak and the second one was Hurricane Maria.
The first time I saw Power Query was [as part of] Power BI during the Zika outbreak [in 2016]. One of our clients needed up-to-date information of the Zika outbreak and its effect on healthcare. With the help of a consultant, we started using Power BI and Power Query.
An Aedes aegypti mosquito, one of the main transmitters of Zika virus.
I began taking courses during that time, and one of them was about Excel. That's when I learned about Get & Transform in Excel 2016.
Any new job that I received, I tried to use Power Query. I taught myself SQL so I could understand better the process of extracting data and how to integrate it into Power Query.
Our job was changing. We could give the tools to our clients that would let them refresh when they needed it the most. No more waiting [on] our area for a data refresh!
Then Hurricane Maria hit Puerto Rico [in September/October 2017]. It was a harsh two weeks of no communication. As soon as I came back from work, I noticed the change in attitude. As a healthcare company, we began doing Public Health.
Hurricane Maria is regarded as being the worst natural disaster on record to affect Dominica and Puerto Rico and the deadliest Atlantic hurricane since Hurricane Stan in 2005.
My main job was identifying members with certain serious conditions. I used Power Query and Excel to create processes that obtain information from the assessment done to keep track of the efforts of the company. The clients could refresh the data and see who was missing, fix any data entry errors and more.
I'm very proud of my work, and Power Query in Excel and Power BI has been a large part of my growth. In the present, we have created a tool that refreshes constantly to help identify members with serious conditions. Now in case of any emergency, we'll know who to attend."
~ J.A. Garcia
We were very inspired how Mr. Garcia began is Power Query journey as part of the disaster recovery efforts after these emergencies, and that he and his team continue to leverage this powerful tool in both Excel and Power BI. Power Query really can help save lives!
Do you have an story to share about your Power Query journey? Maybe it hasn't saved your life literally, but perhaps it has saved you hours of time and effort, a significant amount of money, or even your sanity! Let us know in the comments below or contact us through the Excelguru site.
What an overwhelming response to Power Query Challenge #2! We had 40 submissions, and some with multiple entries in a single submission. Plainly you all enjoyed this!
Naturally, there were a couple of submissions that involved custom functions, and a couple who wrote manual grouping functions to get things done. These folks obviously know how M works, so I'm going to focus more on the other entries to show different UI-driven routes to accomplish the goal. Each of those is included in the workbook that you can download here.
The Base Query
I'm going to start this by creating a base query called "Source Data" which has only 2 steps:
Connect to the Data Table
Set the data types
This is going to make it easy to demo certain things, but also replicates what a lot of you did anyway.
Most Popular Solutions to Power Query Challenge #2
By far the most popular solution to Power Query Challenge #2 was by starting using one of the following two methods:
Method 1A - Group & Merge
Reference the Source Data query
Merge Customer & Membership
Remove duplicates on the merged column
Group by the Customer column and add a Count of Rows
Method 1B - Group & Merge
Reference the Source Data query
Remove all columns except Customer & Membership
Group by the Customer column and add a Count of Distinct Rows
Either of these methods would leave you with something similar to this:
Method 1 Completion
No matter which way you sliced the first part, you would then do this to finish it off:
Filter the Count column to values greater than 1
Merge the filtered table against the original data set:
Matching the Customer column
Using an Inner join
Remove all columns except the new column of tables
Expand all columns
Set the data type of the Data column and you're good
Of the 34 entries, this variation showed up in at least 25 of them. Sometimes it was all done in a single query (referencing prior steps), sometimes in 3 queries, and sometimes it wasn't quite as efficiently done, but ultimately this was the main approach.
A Unique Solution to Power Query Challenge #2
I only had one person submit this solution to Power Query Challenge #2. Given that it is 100% user interface driven and shows something different, I wanted to show it as well. I've labelled this one as Pivot & Merge.
Here's the steps:
Reference the Source Data query
Remove all columns except Customer & Membership
Select both columns --> Remove Duplicates
Pivot the Customer column (to get of products by customer)
Demote the headers to first row
Transpose the table
And at that point, you have this view:
Look familiar? You can now finish this one using the steps in "Method 1 Completion" above.
Personally, I don't think I'd go this route, only because the Pivot/Transpose could be costly with large amounts of data. (To be fair, I haven't tested any of these solutions with big data.) But it is cool so see that there are multiple ways to approach this.
The Double Grouping Solution to Power Query Challenge #2
This is the solution that I cooked up originally, and is actually why I threw this challenge out. I was curious how many people would come up with this, and only a couple of people put this out there. So here's how it works:
Reference the Source Data query
Stage 1 grouping:
Group the data by Customer and Membership
Add a column called "Transactions" using the All Rows operation
This leaves you here:
Now, you immediately group it again using a different configuration:
Group by Customer
Add columns as follows:
"Products" using the Count Distinct Rows operation
"Data" using the All Rows operation
Which leaves you at this stage:
It's now similar to what you've seen above, but we have a nested table that contains our original data. To finish this off, we now need to do this:
Filter Products to Greater than 1
Expand only the Transactions column from the Data column
Right click the Transactions column --> Remove Other Columns
Expand all fields from the Transactions column
Set the data types for all the columns
And you're there!
Again, there were more solutions submitted for Power Query Challenge #2. We had:
A couple of custom function submissions (of which each was slightly different)
A couple of custom grouping solutions (not written through the UI)
A couple of solutions that used grouping, then used a custom column to create a table based on the grouped output which filtered to distinct items
If I haven't covered yours here and you feel that I missed something important, please drop it in the comments below!
The part that fascinates me most about this is that we had UI driven submissions involving merging, transposing and grouping. Three different methods to get into the same end result.
Miguel and I were at the Microsoft Business Applications Summit last week, and we were frequently asked for an update on the Master Your Data book (aka M is for Data Monkey version 2.0). We were told that it’s time. People pointed out that they had pre-ordered it on Amazon ages ago. Enthusiasts asked why we don’t have a subscription model with monthly updates like Power Query does.
There’s a hunger to see the new version. We’re flattered that you rely on us, and honestly, we’re gutted that you are still waiting for it. And after attending the summit, we know that we need to give you an update on the Master Your Data book.
Some background on publishing…
Before we tell you what’s happening, I’d like to just explain a bit about the back story on what we have to consider when we write books on technology. The primary factors are:
How to fit it in with our schedules. Even over the long term, books don’t come close to earning anywhere near the financial rewards of just dedicating time to consulting projects. (This is a big factor in the subscription question.)
In today’s world of constant updates, we know that there are new features added on a monthly basis. The question is, which ones are serious enough to cause us to delay the release?
If you look back at M is for Data Monkey, we are really proud of its long-term value and continued relevance. It kills us that merges aren’t in there… they came out a few days after the book went to print. Would we have held the book for them if we had known? Yes. Would we have held the book for conditional columns? No. This is just one of the kinds of decisions we have to face.
No matter which way we go, we’ll always wish we waited for the next great feature. And we can’t. We know that. But our goal is to make sure that the material inside the book stands the test of time well and continues to hold relevance as features are added and changed. We believe that we’ve managed to do that with M is for Data Monkey fairly well, all things considered. Are there easier ways to do some things today? Yes. But does the book give you a deeper understanding and still let you accomplish the same goals? We believe it does.
The factors that lead to delays
Features are one thing. They generally add new functionality. But User Interface changes are something else entirely…
Earlier this year, we made the call to delay the Master Your Data book in order to get a clearer picture on what Excel 2019 was going to look like. We needed to know which Power Query features would be there, and which wouldn’t. It just doesn’t make sense to publish a book around the same time of Excel 2019’s release with Excel 2016 screen shots. We’ve already been told that some stuff in M is for Data Monkey looks “dated”. We certainly didn’t want the new Master Your Data book to be “dated” on the day of release due to a User Interface change.
And now, at the Microsoft Business Applications summit, we saw a preview of what is targeted for release into Power Query in the next few months. These new features are significant, they are impactful. But most relevant to us is that they contain a significant change to the Power Query User Interface. They will affect every single screen we use. They will affect every single screen shot we take. And if we don’t wait, we will deliver to you a brand-new book that has pictures that don’t look anything like the User Interface you see on screen. Even if we were to push material to the publisher today, it takes 2-3 months to get the book to Amazon, so best case, you get 2-3 months' use out of the book.
To us, that is irresponsible. We refuse to take your money and deliver you a substandard product. It’s just not right.
Just how significant were the MS Biz Apps announcements?
If you weren’t at the Microsoft Business Applications Summit, you might not know about these announcements. You can read the full list here, but let’s recap the key ones for us here. We can divide them into two categories:
Awesome-but-not-critical (i.e. we would cry because we couldn’t include these, but wouldn’t delay the book for them)
New data connectors (including extract from PDF)
Critical features (stuff that must be in the Excel version of Power Query before we can test material, write about nuances, shoot images and release the book)
Data profiling (quality) previews
M Intellisense in the Advanced Editor, formula bar and Add Custom Column window
These last two features will have a significant effect on the images of the book, as you can see here:
What is the revised timeline for the Master Your Data book?
The new Power Query features are estimated to arrive in Power BI Desktop by October 2018. And based on the historical pattern, these features will show up in Excel within 2-3 months of their Power BI release date. Giving us time to test the new features, take screenshots, revamp the book order to best tell the data story the way we need to… We are hoping to have the book in print by the end of Q1 2019. It’s still aggressive on our side, but that is our refined target. If the builds ship later, or things take longer then anticipated, it could slide it into Q2.
Yes, we know it’s a long way away. We know you’ve been waiting, and we wish it could be faster. But again, we hope that you understand that we are doing this to truly give you the best book that will last longer than it could otherwise.
In the mean time – can we give you something else?
We have been working on another product as well: Master Your Data in Excel & Power BI recipe cards.
Naturally, all members of our Power Query Academy will get a free copy of these. And due to the significant delay of the book, we’d also like to offer a free copy to anyone who has pre-ordered Master Your Data on Amazon. (More on this below.)
So, why can we do these, but not the book? It’s because they assume you already know Power Query’s User Interface, so only provide the steps on how to accomplish the goal. Loaded with before and after pictures, and the route to get from one to the other, we aren’t bound by User Interface design changes.
Here’s a quick sample of one of the cards:
How will these be sold?
Ultimately, we plan on selling this product on a subscription basis through our web store as follows:
$14.99 for the purchase of the downloadable card set
$2.99/quarter for a subscription to updates
We already have 26 cards designed, with more on the way. As we expand the set, the original purchase will include the new cards. But for those on subscription, we will update your original purchase and give you access to the new cards when we release them. We’re not intending to hold these for quarterly release, but rather send a new one every time we build it. You might get five in one quarter and one in the next, but our intention is to keep delivering new patterns as we discover them and build summary tips cards to illustrate them.
Wait… didn’t you say subscription doesn’t work for publishers?
For books, yes, it’s really hard. They’re complicated and require ensuring that things are taught in the right order, with all the updated techniques along the way. These Master Your Data recipe cards are snapshots of what to do in certain data cases when working with data in Excel and Power BI, so are a much more refined scope.
It’s way easier for us to update cards, or add entirely new ones, as it doesn’t require re-writing precedent chapters. So in this case, it makes sense, as we can provide an initial catalogue of patterns, and add more over time. We’ve already got ideas for a bunch more to expand this set.
How can I get my hands on the Master Your Data Recipe Card set?
There are a few ways…
For those of you who are members of the Power Query Academy, we will add the tip cards as a resource as soon as we have them ready. It’s part of your subscription so, as long as you’re still an Academy member, you’ll get all the new ones we create. In addition, we will also make sure you get a copy of the new Master Your Data book as soon as it is released (even if your subscription has expired and you’re no longer an Academy member).
For those of you who have pre-ordered our new book on Amazon, please follow the Excelguru blog. We will post when the recipe cards are ready and will let you know what you need to do to get your free download of the initial package of cards. The subscription for updates will be available as well, but will be entirely optional.
And if you’ve just been waiting for the Master Your Data book and haven’t purchased yet, all good. We’ll be setting these up in an online store to allow you to buy the download version and (optionally) sign up for the updates as well.
When will the Master Your Data Recipe Card set be available?
Soon. We are in final design for the card set now and need to set up our web store to handle subscriptions. Our target is to have that all done by September 15, 2018, if not earlier. Keep watching here for the official announcement.
…we wish we could send the Master Your Data book to you today, but hope that this will make a reasonable substitute to get you over the hump until we can. Thank you for your patience, understanding and trust in us as we work to deliver you the best version we possibly can.