Latest Monkey Tools Roundup

An email from a client this morning underscored the need for a blog post that provides a Monkey Tools Roundup.  With the amount of time and effort that went into Master Your Data, I sorely neglected the blog and specifically telling people about the new features that we’ve released this year.  So let’s take a quick look at the highlights of what we added to this tool in 2021 (so far).  And if you don’t have Monkey Tools yet, you can download a free trial here.

Monkey Tools Roundup - Summary Jan to Aug 2021

Monkey Tools automatically checks for updates every couple of weeks, and most of the time you’ll find that a new one is available for installation.  Once thing we don’t do a very good job of, however, is telling you what’s in them.  Often times they are just bug fixes, but they also include new features.  Typically we’ll announce those during user group presentations with a demo, but not always.

Release Summary

Here’s a summary of the major releases we’ve released so far in 2021:

Date Release Details
2021-08-06 1.0.7888.30374
  • Internal rewiring of Monkey Tools' brain to make it smarter
2021-07-28 1.0.7879.30981
  • GetMonthEnds Function released
  • Fixed issue where error caused Monkey Tools to miss all subsequent model details
2021-07-15 1.0.7866.42351
  • Added Pivots & Filters -> DAX Table Monkey
  • Detailed Error Logging diagnostics for Monkey Tools added to Global Options
  • Several bug fixes
2021-06-07 1.0.7828.26709
  • Fixed bug in ImportMonkey
2021-05-20 1.0.7810.32706
  • ImportMonkey Released
  • Digitally signed Monkey Tools add-in (previously only installer was signed)
  • Bug fixes
2021-05-07 1.0.7797.26285
  • Filter Context Measure Released
2021-04-26 1.0.7786.26237
  • SCD2 Monkey Released
2021-04-06 1.0.7766.22272
  • Various bug fixes
2021-03-25 1.0.7754.30938
  • Beta builds of ImportMonkey and SCD2 Monkey
2021-02-19 1.0.7717.30552
  • Bugs fixed in CalendarMonkey and TableMonkey
2021-02-08 1.0.7709.34880
  • Performance Enhancements to TimeSleuth
2021-01-08 1.0.7678.28973
  • Create Query From M Code feature released
2021-01-05 1.0.7675.29069
  • Added Option flag to enable new PivotTable buttons
  • Various bug fixes

For reference, this isn’t all of the releases, just the biggest ones.  There were about a dozen other releases scattered throughout this window as well.  Those were mostly related to fixing bugs, but also included some internal work that we did in order to improve our Monkey’s brain, as well as provide us with the ability to incorporate Beta features to specific audiences.

Monkey Tools Roundup – Features Released

A big reason for the Monkey Tools Roundup is that we’ve been a bit remiss in telling people about these new features.  So let’s look at the specific features that we’ve added to the tool so far in 2021.  We’ll start with the oldest first…

Added Option flag for new PivotTable buttons

If you are on Office365, you may have received the new experience where the Insert -> PivotTable menu no longer contains “PivotTable” and “Recommended PivotTables”, but rather is split across three buttons (as shown in item 1 of the image below).

Excel's pivot table (left) compared to the natural Monkey Tools Pivots menu (middle) and revised version (right)

We love this new menu, and really wanted to incorporate those buttons on our Pivots & Filters menu as shown in item 3 above.  Unfortunately, we have no way to programmatically identify if you have them or not, which meant that we have to serve a menu that looks like item 2.  To solve this we added an option under Options -> Global Options -> Use Legacy PivotTable Menu Buttons.  By default this is checked, returning the view shown in item 2. But if you have the left hand menu shown above, just uncheck it and you’ll have a menu that shows like item 3.

Query Monkey -> Create Query From M Code

There are many times where I copy a query and need to paste it into Power Query.  The feature allows you to do this, but also allows indenting and choosing the load destination right up front. It was designed primarily to assist with copying and pasting samples when helping users in forums, but can also be a handy form if you have a library of queries that you maintain outside Monkey Tools.

The Insert Query from M Code user form

The SCD2 Monkey

In our Dimensional Modeling course at Skillwave, we spend about an hour going through the manual process in order to solve the Type 2 Slowly Changing Dimension challenge.  This feature allows you to solve the same goal in under one minute.  It is fully configurable for keys with or without meaning. Granted, it does require some understanding of dimensional modeling, but for those who run into the issue, it’s sure to save you a TON of time.

If you’d like to understand the background of how (and why) this feature exists, you should watch the recording of Quickly Solving the SCD Challenge on my YouTube channel.  The first 48 minutes show the manual way to solve the challenge. From minute 48 on you can see the demo of this tool in action.

Import Monkey

Since the initial release of Monkey Tools, I’ve always had the goal of adding this feature.  Import Monkey allows you to import your models from either a Monkey Tools backup file or – more impressively – Power BI Desktop files, recreating them in Excel.  While there are things in Power BI that we can’t bring backwards, there is a great deal that we can recreate including queries, relationships and measures.  And what we can’t build for you, we’ll report.

For a full demo of how the Import Monkey works – as well as an overview of a ton of other Monkey Tools features – check out the webcast that I did with Reid Havens.

Measure Monkey -> Filter Context Measure

One of my students asked for this during one of the AMA sessions of my Self Service BI Bootcamp. We thought it was a good idea as they were copying and pasting back and forth from other applications to make it happen.  This feature basically allows you to create a measure to return the filter context of a given cell into a PivotTable.  I can’t claim credit for the DAX pattern itself, but giving you a variety of options to create the measure is something that we’re proud of:

Building a Filter Context measure with Monkey Tools new Filter Context Measure Monkey

And after adding this measure to a PivotTable, it nicely shows the filter context at every given row/column intersection:

Filter Context measure in action on a PivotTable showing the filter context of each cell

DAX Table Monkey

This feature was discussed and demonstrated in my Creating Unpivotable Charts presentation for the Vancouver Power BI and Modern Excel user group.  (It makes its first appearance at approximately minute 48 of the presentation.)  Basically, what it does is allow you to create tables in the Excel worksheet that retrieve values from the data model via DAX queries.  While the meet-up recording does still mention that it is in Beta, it is fully release in the software.

Detailed Error Logging diagnostics

This is honestly something that I hope you’ll never need: in order to help debug issues with Monkey Tools, we’ve added a flag to turn on detailed error logging to a file for the current session.  It can be turned on in the Global Options and is super helpful tracking down the source of bugs that people report to us so that we can fix them.

Insert a fnGetMonthEnds function

This new feature injects a handy little function which will return a table of the Month-Ends between two dates, as shown here:

The results of inserting and using the fnGetMonthEnds function is a list of Month End dates on each row

This pattern is actually super helpful, especially if you need to allocate items over a given number of months: a technique that I’m going to be demonstrating in a session called “Several Ways Since Sunday” on August 29, 2021.

Monkey Tools Roundup – What We Are Working On

To finish off our roundup, I figured I should add a quick note as to what is coming up next.  We’re not promising a lot of new features over the next couple of months.  The reason for this is that we are actually doing a lot of internal work on the Monkey’s brain at the moment.  We’re refactoring a lot of old code to make it more robust and scalable, which will allow us to add some other cool things that we are unable to accomplish currently.

Having said that, we do have some features in the pipeline as well, but it is a bit too early to share details about what they are.  If you have ideas that you’d like to see in Monkey Tools, please do share them with us.  You can do so via our Feature Request form.

I hope that this has helped enlighten you as to the new features that have arrived this year.  We’ve still got a lot of stuff on our list, one of which is being a bit more pro-active about announcing what has happened!

New Monkey Tools Features

We're super excited to let you know that we've just released some new Monkey Tools features!  Let's take a quick look as to what is new...

The Table Monkey

This feature was actually released back in December. However, since we announced it at the KSA meetup (which you can see on YouTube), we decided that it needed a personality of its own.  So now, on the Query Monkey menu you'll find the Table Monkey: a monkey who is dedicated to helping you build queries from Excel tables.The Table Monkey allows creating queries not just from one table, but multiple tables in one shot

Some of the cool features of this Monkey are:

  • It can create multiple "From Table" queries at once.
  • Tables can be excluded with a single click.
  • It can create "Staging" layers for you - as per our Dimensional Modeling course on Skillwave.Training, with custom staging layer names or counts.
  • You can rename the Excel tables by right clicking on the blue boxes that represent the Excel tables.
  • You can rename the Queries by right clicking on the green boxes that represent the data model tables.
  • It allows you to toggle the end query so you can load it to the data model or as a connection.
  • It provides a data typing algorithm that is smarter than Power Query's native algorithm.

Overall, we find this to be super useful. It allows us to create multiple table connections in a few seconds, rather than the minutes it would take us to set things up manually.

This feature is a Pro feature, but is fully functional in our free trial.

Create Query from M Code

The next feature that we included is a nice interface to create a new query from M code.  If you post in forums and need to quickly create a query for testing, you can simply take their code, paste it into the form, give it a name and click create.  Much easier than having to create a new query, edit the code, select everything and then paste:

Using the new Create Query from M Code feature to quickly create a new query

The main benefit of this form is saving you the headache of jumping into the query editor to create your query. Additionally, we also added the ability to indent the code right in the form. So if you're just trying to read it, it can be useful without ever creating a query at all.

We feel that this would be a super useful feature for those helping each other in the community. Thus, this feature falls in to our "Forever Free" category and works at all license levels (include after your trial expires).

Convenience Features - Pivots & Filters

Another one of the new Monkey Tools features that we've added is a Pivots & Filters menu to the Monkey Tools ribbon.  This is purely a convenience feature. It's designed to bring the commands closer to you so that you don't have to do as much tab switching:

The new Pivots & Filters menu allows creating PivotTables, PivotCharts and Slicers and Timelines without leaving the Monkey Tools ribbon

The version on the left is what we are terming the "Classic" view, which shows you the Insert PivotTable button (as well as PivotCharts, Slicers & Timelines).  The view on the right is what your menu will look like once the new Insert PivotTable button rolls out to your Office 365 install.  (If your Monkey Tools menu starts with PivotCharts, then head to our Options screen and uncheck the "Use Legacy PivotTable Menu Buttons" option.)

Bug Fixes

And - of course - like every release we do, we have included a bunch of bug fixes. Fixes that are applicable for all users including Pro, Trial and Free.

How to you get the new Monkey Tools features?

If you already have Monkey Tools installed, then head in to Monkey Tools -> Options.  If you are running 1.0.7678.28973, then you already have them.  And if not, click Check for Updates Now to update.

Don't have Monkey Tools installed?  You can try the full feature set for free for two weeks before the license reverts to a "free" license.  We think you'll be pleasantly surprised with how useful Monkey Tools is on a free license, and yet how much more it does in the Pro version.

 

More free features in Monkey Tools

Wow, it is hard to believe it is already December.  And looking back at my blog, I realized that I forgot to tell you that we released a few more free features in Monkey Tools over the past month!  In fact, November was a busy development month for us, so I though it would be a good time to share what we have done.

GetISOWeek Function

One of my friends saw the ability to create a calendar using the Calendar Monkey.  While he was suitably impressed, he did also ask me if it could do something he badly needed, which was to create a column displaying the ISO week that is commonly used in Europe.  Unfortunately, the Calendar Monkey had not learned enough about ISO weeks at that time, so was unable to help. So, we sent a couple of the Monkeys back to school…!

If you are on a trial or free version of Monkey Tools, you will find that the Query Monkey will now allow you to add a custom Power Query function called GetISOWeek to your file.  From there, you can manually call this function via the Invoke Custom Function button, or via writing a formula in the Custom Column dialog within Power Query.  Simply feed the function any date column to get the ISO Week Number, and include “true” for the final (optional) parameter if you prefer the “precise” text version:

Date\Formula =fnGetISO( [Date] ) =fnGetISO( [Date], true )
Sun 30 Dec 2007 52 2007-W52-7
Mon 31 Dec 2007 1 2008-W01-1
Tue 1 Jan 2008 1 2008-W01-2

Of course, adding a new function in to your workbook is great, but for our Pro users, the Calendar Monkey wanted to make it even easier, and added it as a default column choice.  No fuss, no mess, just choose the ISO date formats you need and let the Calendar Monkey do the rest!

The new ISO Week options displayed on the Calendar Monkey form

Measure Monkey – Basic Explicit Measures

While we are also super proud of our Measure Monkey who will help create Multiple Explicit Measures, we also realize that there are times where you need to create individual measures.  For this reason, we trained another Measure Monkey to do exactly that.

The new Basic Explicit Measures feature shown on the Measure Monkey menu

The Measure Monkey that focuses on Basic Explicit Measures provides you with a no-code experience to create… well… basic explicit aggregations.  (Yes, you could make Implicit versions via drag and drop, but serious modelers far prefer the more customizable and scalable explicit versions.)

This Measure Monkey will help you create these measures without writing a single line of DAX (although it does show you the DAX it has created.)  You will be provided a list of relevant aggregations (go home COUNTA!) and smart default formatting choices.  The Monkey will even capture your preferred defaults to make you even faster next time.

Side by side vide of creating a SUM and LASTDATE aggregation with the Basic Explicit Measure Monkey

And, like its brother who builds Multiple Explicit Measures, this Measure Monkey will work for you for free!

Support for Non-English Queries

Did I mention that my friend whom I referred to above, runs a French version of Excel?  Unfortunately, Monkey Tools had some challenges reading the queries in his model correctly.  While we have always claimed that we only support English versions of Excel, this still bothered us.

One interesting part about being a coder is that MOST coding is written in English. But every now and then, Microsoft localizes something that we did not expect.  So was the case with the underlying Power Query connection name.  To make a long story short, I have now learned that “Query” is “Requête” in French, “Abfrage” in German, and has other localized words among other languages.  And now that we know?  We have retrained our tool to deal with this challenge.

What this means to you if you are a user of a non-English version of Excel is – while we are not quite ready to say we fully support all non-English versions of Excel – we do believe Monkey Tools should work no matter the localization of your Excel install.  (We do still recommend caution here.  Until we say we OFFICIALLY support all languages, please do try the Trial version before you buy, and let us know if Monkey Tools has any issues reading your queries!)

Feedback Mechanisms

Another question we received from time to time was “How do I give you feedback?” or “How do I report a bug?”  It was enough that we realized that we had done a poor job of giving you a mechanism to do so.  So to that end, we have added the following to the Monkey Tools Help menu:

  • Log a Bug
  • QuerySleuth Indenter Issues (for issues specific to QuerySleuth indentation)
  • Feature Suggestions

Each takes you to a form that you can fill out to get in contact with the dev team.  And yes, we are open to hearing your suggestions!

Various Other Bug Fixes

Of course, no release would be complete without a few bug fixes.  There were a half dozen fixes that were included in the various November updates (plus another half dozen published last night.)  Each was minor, and not really worth mentioning on their own, but rest assured that we are trying to fix bugs whenever we find them.

What is the Current Version?

To make sure you have all of the current features, go to Monkey Tools -> Options.  If you are running a version that is less than 1.0.7640.41496, then click Check for Updates Now to update.

And if you don’t have Monkey Tools installed yet… what are you waiting for?  You can try the pro features for free for two weeks, and there are a ton of useful tools even if you don’t elect to purchase a pro license.  Click here to get your copy of Monkey Tools.  And hey… if you decide to upgrade to a Annual Pro license today, you can get 20% off with the code BF20MONKEYTOOLS.

So… What’s Next?

We are working on something cool that will help Excel modelers get started quickly.  And if you want to be one of the first to hear about it and see it in action you should attend the inaugural KSA Excel Power Platform meetup, as I’ll be demoing this new feature.

 

Introducing the Measure Monkey

You know the drill… extract, transform and load your data, relate your tables, then create basic DAX measures.  All work that needs to be done before you can really get started on analyzing your data.  Today we’ve unleashed the Measure Monkey to help speed up that process a bit for you.  (You can think of the Measure Monkey as Quick Measures for Excel.)

If you follow Monkey Tools already, you’ll know that our goal is to help you build better models faster.  We already include helpful functions such as:

  • the ability to inject a query that can automatically switch between local folders and SharePoint folders
  • manage your queries via our Query Sleuth
  • build calendar tables on the fly against your data
  • and so much more...

But while we’ve had a nice tool to trace DAX query chains, we haven’t included a lot of DAX functionality to date.  That is changing today.  And oh… before we dive into it, I want to be clear that this feature will be available to ALL users of Monkey Tools.  Yes, even those of you using a Free license!

The Sample Model

Before we dive into this, let’s take a look at a sample data model:

Notice that everything is nicely created and linked (by the way - we created that calendar in a few seconds with Monkey Tools’ Calendar Monkey…) but that there are no DAX Measures on our Sales and Budget tables.  Date and Category are both foreign keys that link each of the those tables to the Calendar and Categories tables.  However, we really want explicit measures to sum both the Sales[Amount] and Budget[Amount] columns.

Of course, these measures are easy to write, but what if your model is a bit more complicated and there are ton of them to do?

Creating Explicit Measures in Bulk with the Measure Monkey

As of version 1.0.7599.31348, you’ll find a new Measure Monkey menu on the Monkey Tools ribbon for this exact purpose:

Step 1A: Which Tables Host The Columns To Aggregate?

When you launch the new feature, you’ll be taken to a screen that looks like this:

This screen in intended to allow you to tell the Measure Monkey which tables hold the columns you need to aggregate.  Our aim in this screen is to give you the highest possible chance of just clicking "Next". That being said, we realize that this may not work for everyone, so we also allow some flexibility here.

In the top left, we pre-select the tables which we believe have the highest chance of needing aggregation: your fact tables.  (Those tables with only ‘many’ sides of relationships attached to them.)  But if we get this wrong for you, you simply need to check the other boxes to include basic aggregations for other tables.  (Ideally, you shouldn’t be aggregating dimensions, but there are – of course – exceptions to every rule.)  You’ll get immediate feedback in the box in the bottom left, as we show all the tables that will be included based on your checkbox selections.

Step 1B:  Tell the Measure Monkey Where to Store Your New Measures

In the top right, we also allow you to tell us where you want to store the measures.  If you have created a specific “Measures” table, we’ll provide that by default.  If you haven’t, we’ll offer to store the measures on the Host Table.  (In other words, all measures created to aggregate columns from the Budget table will be stored on that table, whereas columns from Sales will be stored on Sales.)

Forgot to set up a new Measures table before doing this?  No worries, click the + to add a measures table on the fly, give it a name, and we’ll create it for you:

There are a couple of Advanced options as well, but we believe most people will want to leave these set based on their defaults.  So let’s click Next, to go to page 2…

Step 2: Choose Your Aggregations

This page contains a ton of info, but again we’re trying to provide you the biggest chance of clicking “Create” right away. Unfortunately, this is something that we can’t do in the image above…

The reason our Create button is disabled is that we have two measures offered with the name “Sum of Amount”.  The blue one is the first instance, and any subsequent measures with the same name will highlight in red.  So let’s fix those, and choose a default data type format:

It’s all good to go now, except that I want to add a “Transactions” measure that counts the rows of the Sales table.  So I’m going to click the “Add another aggregation” button in the Sales table. Then I choose the name of the table from the drop down list:

That will give me a new row with a “Count Rows of Sales” measure, which I can quickly rename to “Transactions” before clicking “Create”.

During this process, the Measure Monkey will create your measures for you. Plus, if you created a Measures table, it gives you some advice on how to make it an “official” measures table.  You can see the results in my data model here:

That was Easy…

The demo above was obviously a fairly simple model. Yet it cuts my explicit measure creation time down to less than a minute to create these two measures.  Now consider the time savings when you get a bit more complicated:

So how do you get the Measure Monkey menu?

This update to Monkey Tools is available in Monkey Tools 1.0.7599.31348 or higher.  And it's will be a “forever free” feature, so you’ll be able to use it on either a Free or Pro license!

To try our free trial, head over to the Monkey Tools product page to download your copy.

If you already have Monkey Tools installed, it will automatically update within a couple of weeks. Alternatively, you can request the update now by going to Monkey Tools -> Options -> Check For Update Now…

Use Excel Tables to Filter a Power Query

A question came up in the Excelguru forums today about how to use Excel tables to filter a Power Query.  While Power Query can't read a filter from an Excel table natively, there is a cool little trick that you can do to flow that information through though.

Data Background

The data footprint I'm working with looks like this:

3 tables showing the original data, a table of just years, and the final output with all rows

The Data query is a fairly simple staging query, pulling the data from the Excel table on the left, setting data types, and loading as Connection Only.

The YearFilter query is a little more complicated, as it pulls the data, removes duplicates, and then drills down into the Year column (right click the header -> Drill Down), resulting in a unique list of the Years:

The YearFilter results in a unique list of years in Power Query

And finally the Sales Query, which - shown in an indented and 'colourfied' format thanks to MonkeyTools QuerySleuth - looks like this:

The M code of the Sales query shown in Monkey Tools

The important things to notice about this query are:

  • It references the Data query (no new data is added here)
  • The Filtered Rows step filters to include any item that is in the list generated by the YearFilter list
  • The Filtered Rows step had to be adjusted manually to add the List.Contains function
  • The [Year] column refers to the [Year] column of the Sales query (which flows through from the original data)

So What's the Issue?

We want to use the filter on the YearFilter table in Excel to filter our Power Query.  Unfortunately, that doesn't happen... despite a refresh, all the years are still in the worksheet after setting that filter:

Despite filtering the Excel table, the output isn't filtered

The challenge, when you are attempting to use Excel tables to filter a Power Query, is that Excel can't read the filter.  In fact, Power Query can't access any of the table's metadata about filters or the visible state of the rows.  It therefore brings in all rows from the table whether they are hidden or not.

Using Excel Tables to Filter a Power Query

The secret here is that we need a way to tell Power Query which rows are visible versus which are hidden.  Something we can do by leveraging the AGGREGATE function, since it has the ability to count only visible rows.

The formula I used was =AGGREGATE(3,5,[@Year]) where:

  • 3 indicates the COUNTA() function
  • 5 sets it to ignore Hidden rows
  • [@Year] points to the current row of the Year column

The weird part, if you've never done this before, is that all the visible rows in Excel will always show a 1. But look what happens when you filter to only a couple of years, then edit the YearFilter Query and select the Source step:Using AGGREGATE, Power Query lets us see the visible and hidden rows in the table Boom!  We can see which rows are visible (indicated with a 1) and which are hidden (indicated with a 0).  This now becomes a pretty easy fix:

  • Filter the Display column to 1

And you're done.  The rest of the query will still work, as it drills in to the list of years, so we don't even need to remove this new column.

And just like that, we can now use Excel tables to filter a Power Query:

Setting a filter on the Excel table now filters our Power Query

 

Update to Monkey Tools QuerySleuth

We've been kind of quiet here, but we're excited to announce that we've just published an update to Monkey Tools QuerySleuth feature.  It now contains an "tabbed" experience so that you can easily flip back and forth between queries, "pinning" the ones you want to see and compare.

The Updated QuerySleuth Interface

In this case you'll notice that I pinned The ChitDetails and ChitHeaders queries, then selected the Locations query from the left menu.

An image of the update to Monkey Tools QuerySleuth showing the new tabbed interface indicating two pinned queries and two modified queries

Why does this matter?  Did you notice that the ChitDetails and Locations tab names are both red?  That's because I made changes to both of them to update a data type... I can now hold onto those changes as I flip back and forth between JUST the queries I want to keep in focus.

Updating Multiple Queries

But now, of course, I want to commit my changes and force the data model to update to reflect those changes.  In this image, I'm doing just that, with three queries:

An image of the QuerySleuth prompting the user to ask which queries they want to save and refresh

And due to the selection pointed out by the arrow, each of these queries will not only get saved back to the Power Query engine, but a refresh of each query will be triggered as well.

So how do you get this update to Monkey Tools QuerySleuth?

This update to Monkey Tools QuerySleuth is available in Monkey Tools 1.0.7553.5975 or higher.  And it's available in both the free and Pro versions of the tool.  (Of course, you will still need a Pro version in order to actually save your queries.)

To try our free trial, head over to the Monkey Tools product page to download your copy.

If you already have Monkey Tools installed, it will automatically update within a couple of weeks, or you can request the update now by going to Monkey Tools -> Options -> Check For Update Now…