Visual Analytics for Excel

One of the biggest improvements in 9.2 is undoubtedly in the area of interactive charting. We’ve hugely extended the capabilities of Small Multiples through a new charting engine which brings rich interactive Visual Analytics to Excel (and web, and mobile…).

The ‘Small Multiple’ concept of many charts with a shared axis is very powerful, but in some cases users just need a single interactive chart and 9.2 caters for both scenarios. We have added zoom controls, sliders and a play axis to help users quickly focus in on and further explore specific areas of interest within the chart.

Zoom controls are available through the chart properties – right-click on anywhere in the chart and select Properties > Animation.

Let’s look at the Animation Zoom options in a bit more detail.

Initially you can select an area to zoom in on directly on the chart, however, you can also use the Zoom mode setting to select either a Slider or a Mini Chart.

Selecting a Slider adds a control to the bottom of the chart:

You can use the slider to narrow the display area, and then slide it across the range of data. This can be particularly useful in comparing relative trends across multiple charts.

Mini charts are another option available within Zoom mode – this shows a smaller version of the chart beneath the x axis and allows you to select an area to focus  in on, while retaining the smaller chart to retain the overall perspective.

File:SmallMultPreview small.gif

A Play control allows the user to see how values change over time.  To enable that open the Task Pane and add the required time hierarchy into the Animate chart by container.

Select the time periods you want to cycle through and click Play on the control beneath the x axis – it’s that easy! You can now step back through the periods one at a time, or replay the sequence as needed.

AnimateBy.gif

We hope you’ve found this blog useful and you’re inspired to visually explore your data with these new features!

As always, we value your feedback and any suggestions on how you would like to see our interactive charting extended further.

How’d you like that….displayed!

Today’s blog will show you a really quick and easy way to format your grid to show different display units.

This approach is ideal for dynamic Grids where the size of the values can vary considerably based on the selected filters, or where the user has drilled down to lower levels in the data. For example, if country level numbers are in hundreds of millions, but customer level numbers are in hundreds or thousands, it can be useful to have the ability to quickly change the display units.

Using this method, you can switch quickly to using different formats.  In our example we want to give the user the option to display the measure Reseller Sales Amount as Units, Thousands or Millions.

You can see we have a slicer to the right of the grid giving the user the choice of how to display the figures.

The slicer is based on an Excel range and is not directly linked to the grid.

A couple of things to note are the ‘Update range’ and ‘Activate XL3Link’ slicer settings are checked but more of that later.

‘Enabling Update Range with selection’ means that the slicer choice is written to a cell in the workbook – in our example it’s cell $M$17 (shown in red in screenshot below) – currently Millions are selected.

The other thing to note from the screenshot above are N13:N15.  These are a series of IF statements like below which will determine how the format sheet is updated:

=IF(M13=$M$17,”*”,”NOT SELECTED”)

As M13 is not equal to M17 the Units  row will be set to ‘NOT SELECTED’.

The row containing the ‘*’ is the format which we want to be applied to the Grid.

We now need to reflect that in the format sheet. This is done by first adding three rows for the relevant hierarchy, and setting the Excel numeric format column G to units on the first row, and then thousands and millions on the other two.

We can then set the ‘Member’ cells in column E as a simple formula referencing the table shown above. For example, the Unit’s member incell E50 in the XLCubedFormats sheet is set as =Sheet1!N13.  The same process is followed for Thousands and Millions.

With the format sheet as shown above, based on the user’s slicer selection, all members will then be displayed with the predefined Millions format as ‘*’ is a wildcard and will match on all the members in the Product Categories hierarchy.

The formatting for Units and Thousands will not be applied – unless of course you have a member in your hierarchy called ‘NOT SELECTED’!

As mentioned previously, our Excel slicer is not directly linked to the grid – we need a way to tell the grid to refresh each time the slicer choice changes.

This is where XLCubed’s ActivateXL3Link and XL3RefreshObjects comes into play.

Let’s look at the XL3ActivateLink first.  As you can see from our slicer screenshot above, our slicer is set to activate the XL3Link statement in cell I7.

I7 is set as =XL3Link(XL3Address($K$7),”Set Refresh”,,XL3Address($I$6),TRUE)

As you can see from the screenshot below it sets the target cell I6 to TRUE.

Cell J6 contains the formula =XL3RefreshSheetObjects(I6, “Sheet1”, TRUE).

As I6 is set to TRUE this forces a refresh of all objects in the sheet when the slicer choice changes.

It’s that simple – so the next time your Sales Team want their sales figures displayed as units but the CEO wants to see them expressed as millions impress them with this method!

No comment? We’ve got plenty to say!

Today’s blog will run through XLCubed’s commentary functionality.

At XLCubed we have seen a lot of customer interest in commentary and collaboration in the last couple of years.

We’re all familiar with the standard comments functionality in Excel where you add a comment to an Excel cell.

However, in a dynamic BI environment it can be limiting.  For example, say I add an Excel comment to cell $C$10, then the comment is tied to that specific cell.  If a user changes a filter selection, the numbers change but the comment does not and may not now be relevant.

This is where XLCubed commentary shines through.

By default, XLCubed comments are tied to a specific value and are made at a cell/datapoint level (or higher).  XLCubed comments are dynamic and tied to the data so if the data moves to a different location in the grid then so does the associated comment.  XLCubed comments are not workbook-specific and allow commentary to be viewed across reports.

So where could you use comments?

Potential use cases could be:

  • To warn of a temporary operational issue – for example, a failed data load
  • An at-source explanation of why a value is higher/lower than expected
  • A discussion thread where users can share insight or raise/answer questions in-context (that’s what our first screenshot shows)

To reassure all our users who might worry about permissions and the ability to see information that should be limited, XLCubed commentary access is controlled at a user/group level from the XLCubed control app.

Also, by default all grids have commentary disabled – you have to go into the grid property and enable comments

Comments for a particular datapoint eg Germany, Bikes, January 2015 can potentially be viewed in all reports that refer to that datapoint (as long as the destination grid is enabled to display comments).

Comments can be viewed and added both in the Excel Client and through the XLCubed Web Portal.

Commentary access is configured in the Web Admin tool below:

The options available are to enter comments, view comments, full control or none.

You also need to enable the grid property to allow comments:

Access comments by using XLCubed’s right-click menu > Comments.  Alternatively, comments are available from the XLCubed Grid ribbon.

XLCubed commentary supports highly-formatted text, which can be set directly in the dialog, or copied from Word.

You can include files attachments and images from an Excel range.  Both of these can be useful if you want to bring something in particular to the attention of other team members.

After adding your comments hovering over the cell will display the comment – just like standard Excel as below:

Selecting XLCubed > Comment will show the comments in an XLCubed dialog:

Comment Frames allow you to have a permanent on-report display of the comments rather than needing to hover over or select the specific cell.

These can be tied to a particular grid or to slicer selections.

The grid below has separate comments for France for January 2015 and June 2015 – the comment frame shows both comments at once:

This screenshot shows me all the comments held for the KPIs grid based on current slicer selections:

As you can see from the comment history, there’s been quite a discussion amongst the team regarding the Margin value for May 2012 for all PoS.

Remember, XLCubed commentary is fully-governed with strict control over who can add and who can view comments.

All in all, XLCubed commentary can help add context to and share insight on the numeric data shown in reporting. It can prevent many users investigating the same ‘known’ issues and provides a forum to help team members understand the data and decide on future steps to make better decisions.

We hope you’ve found this blog helpful.

Here’s a couple of useful links – the first is to the v9.1 commentary tutorial:

This is a link to our YouTube video commentary webinar:

 

Eat, Sleep, Report, Repeat!

Repeaters are a visualisation feature introduced in v9.1.  They are effective when you want to repeat a formatted section of a report by one variable.  They can save so much time as you don’t have to go through the tedious, error-prone task of recreating the same section many times by copying and pasting manually.  Imagine the time you’d save setting the design up just once and have the repetition handled by XLCubed!

Here’s an example of a repeater:

Our repeater is based on an XLCubed grid, filtered by Geography, with a panel consisting of formulae with XLCubed In-Cell charts and PictureLinks.  Additionally, each panel is conditionally formatted, with the colouring based on ratio of 3-month and 12-month average sales.

The great thing about XLCubed Repeaters is that you can include any XLCubed or Excel content in them!

Let’s see how easy it is to design our repeater – click Visualise > Repeater on the XLCubed ribbon and in the Designer window define the hierarchy to be repeated by dragging it to the Repeater Setup area.  Similarly, you can also set up any additional filters.

Click OK and then set the content of the repeater by setting up the three key ranges:

  • Repeat range – The entire area required to generate the report for one repetition. It needs to include all the source data and formulae used in the area to be displayed – the area within the blue border below
  • Render range – the display area which will be repeated and shown in the final report – the area within red border
  • Input range – the location where the member parameter will be inserted by the repeater, the cell with a green border. This will be used as the selection criteria for XLCubed Grids or formulae within the ‘Repeat Range’.

You can move/resize the repeater, set borders and margins from the Appearance tab.

You can easily include more items in your repeater by moving them in the Render range.

Remember, you can use any Excel content – in the example below we have a standard Excel chart that we want to also include at the top of our repeater:

Drag the chart into the top of your Render Range (resize as necessary) and your chart now appears like this:

It’s as simple as that!  Set up your repeater once and no more worrying that you’ve missed vital bits of information!

For more details see the Repeaters page on our Wiki:  https://help.xlcubed.com/Repeaters

…and a YouTube video which runs through this example:

https://www.youtube.com/watch?v=d3hYF8vkz-M

For all you football fans out there, our blog on the Premier League transfer window also has an example highlighting the use of repeaters:  https://blog.xlcubed.com/2017/09/charting-the-premier-league-transfer-window/

As always we would love to hear your feedback!

DAX Performance tips– lessons from the field

XLCubed has supported a drag/drop interface for creating reports against Tabular Analysis Services since the first release of the new engine. It lets users easily create reports which run DAX queries on the cube, and we’ve often seen very good performance at customers when MDX against Tabular was a cause of long running reports.

So when we were approached at SQL Pass in Seattle by some attendees who had a SSAS Tabular performance issue we were optimistic we’d be able to help.

In this case the business wanted to retrieve thousands of rows from the cube at the transactional level, and the first approach had been to use PivotTables in Excel. To get to the lowest level they cross-joined the lowest levels of all the hierarchies on the rows section which would give the right result, but performance was terrible, with several queries taking 20 minutes or more and others not returning at all.

We hoped using an XLCubed table running DAX would be the solution and created the same report in the designer. Sadly while performance was a little better it was still far from acceptable; the model was large, and the number or columns combined with their cardinality meant that a lot of work was being done on the server.

XLCubed’s DAX generator was trying to cross-join all the values from each column, which had worked well for our other customers. But when there are a dozen columns including the transaction ID things do not go so well. DAX in itself is not a magic bullet and SSAS Tabular models can hit performance problems on low level data – we needed a new approach.

After some investigation we discussed the issue and our thinking with our friends at SQLBI and determined that instead of cross-join we wanted an option to use Summarize() instead as this only uses the rows in the database, and it can access columns related to the summarized table which were required for the report.

As the customer’s report had the transaction ID in it the result wasn’t aggregated, even though we were using summarize. But we wanted to add true transactional reporting too, using the Related() function.

Finally, SQL 2016 adds a couple of new functions, SummarizeColumns() and SelectColumns(), both of which are useful for this type of reporting, but offer better performance than the older equivalents.

The end result in XLCubed is a new option for DAX tables to allow users to set the type of report they want to run, and some internal changes so that XLCubed will automatically use the most efficient DAX function where they are available.

A beta was sent to the business users and the results were fantastic. The report which had run for several minutes now completed in a few seconds, and 20 minutes was down to 15 seconds – we had some very happy users!

The changes will be in the next release of XLCubed so that all our customers can benefit from the improvements. It’s always nice when a customer request helps improve the product for everyone.

A sample of the syntax change is included below

Before:

 

EVALUATE
FILTER (
    ADDCOLUMNS (
        KEEPFILTERS (
            CROSSJOIN ( VALUES ( 'Customer'[Education] ), VALUES ( 'Product'[Color] ) )
        ),
        "Internet Total Units", 'Internet Sales'[Internet Total Units],
        "Internet Total Sales", 'Internet Sales'[Internet Total Sales]
    ),
    NOT ISBLANK ( [Internet Total Units] )
)
ORDER BY
    'Customer'[Education],
    'Product'[Color]

After:

 

EVALUATE
FILTER (
    ADDCOLUMNS (
        KEEPFILTERS (
            SUMMARIZE ( 'Internet Sales', 'Customer'[Education], 'Product'[Color] )
        ),
        "Internet Total Units", 'Internet Sales'[Internet Total Units],
        "Internet Total Sales", 'Internet Sales'[Internet Total Sales]
    ),
    NOT ISBLANK ( [Internet Total Units] ) || NOT ISBLANK ( [Internet Total Sales] )
)
ORDER BY
    'Customer'[Education],
    'Product'[Color]

Report Flexibility, with Control

Sometimes we want to let report users modify the structure of a report but to govern exactly what they can and can’t do. While Grids can be restricted at a granular level to enable and disable functionality, that approach still requires some degree of product knowledge by the user.

XLCubed provides the XL3SetProperty() formula, which enables manipulation of many of the core objects such as Grids, Slicers and Small Multiples. It means report users can have simple slicer selections to change the structure of a report, what’s being displayed in a chart, or to vary the chart type. It gives flexibility within the report, but requires no product knowledge from the end user which can be crucial when delivering web reports on a widespread basis.

One common example of usage is where the hierarchy to be viewed in a grid needs to change based on the measure a user selects (depending on the structure of the cube some measures may not be applicable for all hierarchies). Typically that would need to be handled in two Grids, but we can use XL3SetProperty to bring this together, and also to give user choice on the associated Small Multiple Chart view.

The final published report is shown below:

 

S1

 

If the user selects an “Internet” measure, we show Customer Geography on rows, whereas a “Reseller” measure should show Reseller Type on rows. The same logic applies to the Small Multiple chart. In the screenshot below, the user has selected Reseller Gross Profit as the measure, and ‘Stacked Column’ as the chart type. You can see that the hierarchy on rows has been switched, as has the split within the individual charts, allowing the user to easily vary their view of the data with simple button selectors.

 

S2

 

This is implemented through the following key points:

  • A lookup table in Excel to determine what hierarchy is applicable for each measure
  • An Excel list showing the available chart types – this is used in the Chart Type slicer
    • The chart slicer outputs its selection into cell $AG$10
  • The measure slicer is linked directly to the grid and the small multiple, but also outputs its selection to an Excel cell ($A$B4)
  • A vlookup determines which hierarchy to use based on the selected measure
  • Three XL3SetProperty() formulae now control what is displayed based on user selections:
    • $AB$7 – sets the grid rows
    • $AB$8 – sets the small multiple columns
    • $AB$7 – sets the chart type

 

Formulae

 

The approach gives a deep level of access to the key XLCubed reporting objects, and enables controlled flexibility within web and mobile-delivered reports. No programming is needed, just a mid-level understanding of Excel itself, and XLCubed.

This is just one example of what the approach can achieve – it’s really limited only by imagination. See XL3SetProperty() for more detail, or contact us if you’d like the example workbook.

Finding a needle in a haystack – Member Searching made easy!

Searching for specific elements of large hierarchies can be a real pain in many Analysis Services client tools, and we often hear of it as a major frustration in Pivot Tables where dialogs can be cumbersome and prone to locking up.

XLCubed has both a Quicksearch and an Advanced search in the Member Selector, but in this blog we’ll show how to link the search dynamically to an Excel cell (or a web entry cell on a published report) and to retain the search as a dynamic part of the report rather than a point in time selection.

Let’s say we are a retailer with a large product hierarchy running to tens or hundreds of thousands of products. The naming convention means groups of products can be searched by a partial match on their name, and as a report designer we’d like the users to be able to type the search in as quickly and easily as possible rather than go into a custom search dialog. Here’s how:

Below is the final result in Excel, a simple list-report where the user just types the text they want to search the hierarchy for, and matching products are shown on the rows of the report.

Search1

 

We start with a regular grid, putting Product Categories on rows, and then in the Member Selector we can either select a specific level or set of data to be searched, or go to the Advanced tab and select the whole hierarchy as shown below.

EditHierarchy

 

 

In the advanced dialog, click on the binoculars:

Binoculars

 

to add a search, and then in the dialog below you can either type a search term directly in the ‘Search Value’ or reference an Excel cell, in this case $C$3. ‘Search By’ allows you to specify exact match, begins, contains etc.

Search2

 

At this point it’s worth mentioning that while in this case we are just searching by the name of the product (MEMBER_CAPTION) we could also chose to search by any member properties which exist.

So having done that we simply type the search string into $C$3 and we get the matching products straight away – couldn’t be easier.

To make this available for web deployed reports there are two additional steps:

  • Make $C$3 available for web input. To do that right click on the cell and choose Format cells, and then on the protection tab uncheck ‘locked’.
  • Add a search or refresh hyperlink or button so that the web user can refresh the report when they’ve typed the search term. This can be handled using either XL3Link() or XL3Picturelink and the process is described in our previous blog.

The web version is shown below:

Websearch

XLCubed V7 & SQL Server 2012

SQL server 2012 has recently been released to manufacturing, and at XLCubed we’re well placed to take advantage of everything that is new in 2012.

SQL 2012 delivers Business Intelligence under the ‘BISM’ umbrella (Business Intelligence Semantic Model). BISM comes in different flavours though:

  • BISM Multi-dimensional
    • (Latest version of Analysis Services as we know it)
  • BISM Tabular
    • In-Memory Vertipaq
    • Direct Query

For client tools, BISM Multi-dimensional is largely the same as connecting to existing versions of Analysis Services, with MDX being the query language. For XLCubed we can leverage what we already have in that respect, and the transition is seamless.

BISM tabular is different though. If you choose to deploy in-memory to Vertipaq, client tools can still use MDX, and as such don’t need significant change, other than to handle the tabular rather than hierarchical data environment. However if the deployment is Direct Query (for example for real-time BI), the only available query language is DAX.

There are best use cases for the different deployment options, but it’s fair to say there is a degree of confusion in the space at the moment about the relative merits of each. We’ll try to shed some light and guidance here over the next weeks and months. As a product though, it’s important for us to support and extend the full range of 2012 BI deployment options, and to make these available and accessible to our customers. That’s exactly what we’ve done for version 7.

XLCubed v7, which releases next month, is a client for both MDX and DAX, and as such provides one consistent client interface in Excel and on the Web which can access any of the SQL 2012 deployment models for BI. We are also adding a much richer relational SQL reporting environment.

We are really pleased with some of the beta feedback we’ve had to date, and if you’d like to trial the beta version contact us at beta@xlcubed.com .

We’re looking forward to releasing the product next month, and will be previewing it at SQL Server Connections next week in Vegas.

 

Solve order shenanigans

Today I’m going to blog about a problem we recently solved in a client’s cube, an error in the Mdx script that’s very easy to make if you aren’t careful.

We’ll run a simple example in AdventureWorks (what else?) to demonstrate the issue.

The client had already added a calculation to their cube to show year-on-year growth. The formula is:

Create Member CurrentCube.[Measures].[Delta to PrevYear] as
(
    ([Measures].[Internet Sales Amount])
    -
    ([Measures].[Internet Sales Amount],
        ParallelPeriod(
            [Date].[Calendar].[Calendar Year],
            1,
            [Date].[Calendar].CurrentMember
        )
    )
)
/
    ([Measures].[Internet Sales Amount],
        ParallelPeriod(
            [Date].[Calendar].[Calendar Year],
            1,
            [Date].[Calendar].CurrentMember
        )
    )
, Format_String = "0.00%";

(some error checking removed for clarity)

This screenshot shows a couple of simple XLCubed Grids showing the real value, and below the percentage change. I have added in an Excel calculation to show the results are as expected.

Later during the cube development, the client added a calculated member in their Product dimension, one that gives a total excluding one of the product categories.

To replicate this I’ll add a calculation for “All Ex Bikes”:

Create Member 
CurrentCube.[Product].[Product Model Categories].[All Products].[All Ex Bikes]
as
(
    ([Product].[Product Model Categories].[All Products])
    -
    ([Product].[Product Model Categories].[Category].&[1])
);

And if we run the report again we get the following.

Notice the cell I’ve highlighted. The “All Ex Bikes” calculation works fine on the normal measure, but it gives totally the wrong number for the percentage calculation. What’s going on?

The problem is that in the cell highlighted Analysis Services has two calculations to think about when working out the result.

  • Compare this year to last year
  • Get the “Grand Total”, and subtract “Bikes”

As the number returned is 1.85% we can see that Analysis Services has chosen the second option, “Grand Total” – “Bikes”.

What we really want is for the calculation to be done by getting the subtotal, and then doing the percentage change based on that.

Fortunately the fix was a simple one. Analysis Services will run the calculations in the order they are found in the Mdx Script, so to fix the issue we simply moved the new “All Ex Bikes” definition up above the percentage calculation.

Now the number returned matches our expectations.

Pass/Solve Order can be a complex topic, so you may need to be careful.

In this case the number is totally wrong, so it was easy to spot, but some bugs will be much more subtle, so watch out!

Ranking, Sorting and Filtering

Once we have returned cube members into a grid report we often need to exclude or change the order of the result set to provide more meaningful information. MDX (Multidimensional Expressions) language includes some very useful operators to provide filtering (FILTER), sorting (ORDER) and ranking (TOPCOUNT/BOTTOMCOUNT) of dimension members. These can be quite overwhelming even for power users of XLCubed.  So, in V6, we have introduced a new feature “Advanced Member Selections” to provide easy access to this powerful part of Microsoft Analysis Services.

Using this new functionality we can nest and combine these operations to answer complex business questions (for simpler operations you can right-click on a member in the grid and use the “Apply” menu to perform simple ranking, filters and sorting).

Filtering

So let’s go through a simple filtering example.  Say, for example, that we want to find the products at Product Key level that sold more than 25 units in 2003, Quarter 1 and show the sales figures for those subcategories during 2003 and its quarters.

  1. Start by clicking the Grid ribbon item (or the XLCubed > Design Grid menu item in Excel 2003 and below), and selecting the Internet Sales cube file
  2. Drag Calendar Period to Columns and Product to Rows. You can also drag any other hierarchies to Headers. In the example image below, Measures and Customer have been added there.

  1. Click on the Product hierarchy so that its details appear in the bottom-right panel.
  2. Drag the Product key level over to the right of the dialog. You can switch between the members view and levels view by clicking on the Show Levels icon ().
  3. Click the Advanced tab to show the advanced selection pane:

  1. Click the Members drop down and choose Filter result:


  1. Click the Calendar Period edit control in the grid to change its selection to the desired member (2003, Quarter 1):

  1. Select the This measure radio button, and select Order Quantity as the desired measure.
  2. Change the Operation to >, and type 25 in the edit field on the right:

  1. Click OK. The new filter is displayed in the advanced selections tab:

  1. Click OK again to run the Report – the Grid shows the members that fit our criteria:

 

So we can see the results, filtering by 2003 Q1, but displaying the values for All Time (or any other period we wish to use). We could have also used the Range selector:    to drive the period selecting from an Excel Range and our grid would automatically refresh whenever the driving value changes.

Ranking

Now let’s add a ranking to find the bottom 8 selling products at the Product Key level that have sold more than 25 units inQ1:

  1. Display the Product Hierarchy Editor dialog
  2. Click the Rank result icon () on the advanced selections tab to display the Edit Ranking dialog
  3. Select the Bottom radio button, and type 8 into the edit field
  4. Select 2003, Quarter 1 for the Calendar Period hierarchy in the grid below:

We now have the filter, following by the ranking:

 

Run the Grid: only the lowest 8 members are returned

 

Sorting

Now let’s sort the report on a different dimension – for example, descending order of the Q1 sales.

  1. Display the Hierarchy Editor for the Product hierarchy by double-clicking on the Product label in the Grid
  2. If it’s not already visible, select the Advanced tab
  3. Click the Sort result toolbar button ()
  4. Change the Calendar Period selection to 2003, Quarter 1:

  1. Click the Sort Descending (9-1) radio button
  2. Click OK. The new sort is displayed in the advanced selections tab
Click OK again to run the Report

 

Joining Results

It’s also possible to join different results together: combining both sets (UNION), excluding members (EXCEPT) and returning common members (INTERSECT).

So we could also add the top 10 products  along side the bottom 8 products to the grid. Begin by adding another member selection using the “Add Member List” tool-bar button:

As before, we select the list of members to rank (in this case the Product Key level) and then select the operation we want to perform, a Top 10:

There are various options to decide how to combine the lists, we’ll stick with Add:

 

 

And we get both results combined:


So the “Advanced Member Selections” feature provides lots of the power of Analysis Services in a simplified way  – to try this feature for yourself you can begin by downloading XLCubed.