Excluding members in XLCubed

So today we are going to show you how you can easily exclude members from your XLCubed reports.  Here we have a simple grid which shows lowest level descendants of Promotions on rows and Geography on columns.

 

 

 

 

 

 

 

We would like to rank this report and also exclude the Promotion No Discount which is not really adding any value to the report.

So let’s edit the Promotions hierarchy and set up the exclusion of the No Discount Promotion.

 Click the Advanced tab and then the Add Member List icon:

You will see a window as below:

Now click the drop-down on the right-hand side member list and select Edit.  This will allow us to edit the member set:

 

We are going to exclude No Discount so select it and drag it across.

Next we need to choose one of the following operations to perform on our two member lists:

Add – left and right sides combined

Common – must exist on left and right side

Subtract – left side minus right side

 

We will select the subtract operator and click OK.  We will also click this icon to rank the result:

 

 

Let’s rank these Promotions based on the current measure, Reseller Sales Amount:

 

The Promotions hierarchy has now been edited to exclude No Discount and then ranked.

 

 

Our report now looks like this:

 

 

 

 

 

 

 

 

As you can see the report now excludes No Discount row and has been ranked to show the top 10 Promotions across All Geographies.

Easy pivoting of SQL queries in Excel

So today’s blog is all about pivoting SQL query data columns.

Here we have a small sample of a SQL query report that shows us actual revenue across different products over a number of quarters.  There’s nothing wrong with the data being returned but it is pretty difficult to do any comparison analysis.

So what if your task is to report back on actual revenue across the product categories over all the quarters in this report.

This would not be an easy query to write in SQL as we don’t always know which data will be returned by a query, but that’s where  XLCubed can come to our rescue!

We just right-click on the column heading which we wish to pivot – in our case cDate and then select XLCubed and Pivot (XLCubed fills in the column heading) as below:

 

The report is now displayed as with the quarters across the page as columns.

 

This format is so much easier to read and we can quickly how each of the products are contributing (or not!) to the company’s revenue across a time period.

So that’s how easy it is to pivot column data in XLCubed.

Creating tree-view slicers in v7


XLCubed has always provided a tree view selector to let users chose items from different levels in a hierarchy.   Previously, however, it was only possible to do this directly from a cube-based hierarchy. With the extension of our SQL reporting capability in V7 we found a few scenarios where we wanted to create tree views from non-cube data. This can be easily achieved in Version 7 by using a slicer sourced from an Excel range.  This can then be used to drive reports sourcing data from cubes, Tabular models, or SQL as required.

You can also use this method to allow users to choose items from an amended structure of a hierarchy or a limited part of a cube hierarchy and this is what our example below shows:

As you can see we’re going with a food-based theme.  This Excel range needs to be in a specific format and so we have our list of slicer choices with the three required columns: key, value and depth.

Here are the slicer choices at the different levels of the hierarchy:

 

We’re happy with our list so from the XLCubed tab let’s select Slicer and then Excel which allows us to insert a slicer based on the data in our workbook.

 

 

At this window we need to tell the slicer where to find the data (slicer range) in our workbook and the slicer type – in our case a tree view.

 

In our example we are also giving the slicer a name ‘Food and Drink Slicer’  as well as instructing it to write the slicer selection to cell location $J$19.

The resulting slicer looks like this and the user’s choice can then be used to drive any report, ranging from cube-based grids to DAX and SQL tables.

 

 

Formatting Tables in v7

We’ve had some great feedback from our Newsletter announcing the release of v7.  A number of users have asked how we created the example in the Newsletter:

So,  today we’re going to show you how to achieve some of the formatting that is now available when using SQL tables in v7.

Let’s create a SQL table from Grids & Tables tab.  You’ll see the Create connection window:

Click Connect and you will see the databases you have access to….we’ll create our query based on Bicycle Sales and the fctData view.

 

Our SQL query returns the following data which is great but clearly is not that easy to read.

Let’s format this table.  We’ll get rid of any borders currently set on the workbook by going to the format sheet and using Format Cells on the default cell format cell as below:

 

Back to the table, right-click and refresh table.

 

Now for the actual formatting of the table. Let’s format entries in the first column cPOS. Right-click on Car and Bike Stores, right-click and select Format Column and let’s set the font to be bold, size 12 with a double border on both top and bottom.

Now the second column cProduct. Again right-click Format Column and set the top border to be double, bottom border thick and the font italic.

 

We now go to Properties tab and on Appearance tab set Sections as below:

Check the box ‘Use columns as sections’, the column count is 2 in our example and Display style is set as ‘Sections in separate rows’.

We’ll also hide the first row of the workbook showing the table column headings.
The report now looks like the screenshot below which is much easier to read.

 

Between and Member Searching

Our blog today takes a look at two new features available in v6.5 – Between and Member Searching.

Between

In v6 we give our users  the ability to enter a reporting range for their grid reports by allowing them to enter a  ‘From’ and a ‘To’ range on a hierarchy.

The only thing to remember is that both members have to be at the same level.

So let’s try to put together an example.  Let’s say that we would like to report all data between two dates.

So we edit the hierarchy that should include the range. The hierarchy can also be on the header area of the report as well as on rows or columns.

Under the Advanced tab we click the Clear all icon  

 

before clicking the Member Set icon

 

so that we can enter the From and the To values.

Click OK and our report will show only the members in the range specified.  It’s as simple as that!

Even better for the end-user is the option to enter an Excel range so that they just enter their values into Excel cell locations.

So we’ll run the grid report based on From and To values in $I$3 and $I$4 respectively.

Another great feature of using this option is that we can choose to leave one of the ranges empty.

So if we just enter a value in the Excel cell location for the From date and leave the To date blank the report returns all data from the From date to the latest date available in the hierarchy.

As you can see in the screenshot below we have put FY 2002 in the From range and left the To range empty – so XLCubed returns all data from FY 2002 to latest.

Conversely, leaving the From date blank and entering a value in the To date will return all data from the earliest date available to the To date.  This time XLCubed returns all data until FY 2003.

 

So that’s how you report on a range in XLCubed.

PS Don’t forget both members of your range have to be at the same level in the hierarchy.

 

Member Searching

Another great feature of  v6.5  is the new functionality that allows the user to filter a report by searching for members in a hierarchy.

Let’s show this functionality in action with a simple example.

Our report below shows a simple grid with Geography on rows and Fiscal Years on columns – we’d like to show only those members in the Geography hierarchy (at all levels) that start with B.

 

Click the Advanced tab and then select All Hierarchy Members by clicking:

Click on Member Search and the following window will be displayed:

At this point we have two options:

  • enter a value in the Search Value field – in our example we enter B
  • use Excel range to hold the value that should be used

In our example we are using the value in cell F2 to determine the filtering on our report.

We can determine the ‘search by’ criteria as below – ‘Ends with’, ‘Begins with’, ‘Exact match’ or ‘Contains’:

Additionally, we can choose the ‘Property to search by’:

  • MEMBER_CAPTION (most commonly used)
  • MEMBER_UNIQUE_NAME
  • MEMBER_KEY
  • PARENT_UNIQUE_NAME

As you can see the report now only shows those members of the Geography hierarchy that start with B regardless of their level within the hierarchy.

 

This example is based on an entire hierarchy but it is also possible to do the same for a specific set of members, for example, a level or descendants of a specific member.

We hope this short example has shown you how easy it is to use Between and Member Searching within XLCubed reports.

 

Breakout and Propagate – Oldies but Goodies

We’ve been on-site with various customers in the last few months, it’s always good to see how the product is being used, and we value customer feedback, which often feeds into our development cycle.

With two long-term customers we found that they weren’t aware of two very useful pieces of functionality which have been in the product for many years. In case there are others in the same boat…..

1) Breakout

Breakout is available on the right-click menu of any XLCubed report, grid or formula. It’s a way to understand how the number is split into elements of another hierarchy. On a right-click, you can switch to the breakdown of the number by any other hierarchy in the cube. It’s particularly useful where a reported number seems too high or too low, and needs further investigation. In the example below, we’d like to understand how the June 2004 number for the US is made up in terms of Products. We’ve chosen breakout on the right-click menu, specified the Product Model Categories hierarchy and the level to run the breakout at. The breakout result is shown on the bottom right, and we can quickly see that in June Touring bikes were contributing almost 33% of the US revenues. In this example we’ve also included a sparkline to give a feel for trend over the last 2 years (previous 23 months, plus the current month).

The breakout result is still linked to the report selection criteria, so can be used as a dynamic part of the report ongoing.

 

2) Propagate across Sheets

Propagate across sheets is a way to quickly replicate a report onto additional sheets, where just one variable is changed. Typical-use cases for this are entity-based reporting, where for example there is a standard P&L template across the business, and the user wants to quickly generate a P&L for each legal entity. You can build the report as normal, and then when done, right-click on the selected member for the hierarchy you want to propagate, and choose the elements which you want to create additional sheets for. On the new sheets, the formatting and print layout are identical, with the only change being the selected member on the propagated hierarchy.

This example shows the income statement about to be propagated for the four selected departments.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Drive Excel Chart Min/Max from Range

How do I drive the min and max values of an axis from an Excel Range? This is one of the most commonly asked questions about Excel and with each new release it always amazes me that this feature hasn’t been added to the base product.

It’s a very common scenario to come across, you are building a line chart and it’s all looking ok until Excel suddenly decides to set the min value to 0, all of the detail is lost and you have gone from a nice detailed set of lines to a mishmash of colours a few pixels high.

There are some pretty sophisticated techniques Excel is using when working out what min & max to use, but sometimes we just want to set them to a particular value (normally anything other than 0!).

Here’s a pretty simple set of numbers and the resulting chart we get from Excel (just with all the defaults).

 

 

 

 

 

 

 

 

 

 

This all looks fine, but let’s change  “C” Monday’s value to 86, now look what happens:

 

 

 

 

 

 

 

 

Excel has applied its rules and decided that 0 is a good place to start the chart from, but in this case I lose a lot of the detail and end up with all the lines grouped together.

We could, of course, change the Axis min value to something a bit more sensible, so we’ll use the Format Axis option to set a minimum value of 84:

 

 

 

 

 

 

 

 

 

 

 

 

That looks better!

 

 

 

 

 

 

 

The base numbers had been entered manually, so being able to type a fixed value into the minimum axis is fine, but what if the numbers were coming from a cube or Sql database? Wouldn’t it be really helpful to be able to drive the minimum value from a range; I can change just about every other thing about the chart but after so many years and so many different version I still can’t do this.

Luckily for me (and our customers!) we already have an Excel addin so we can simply add the functionality to do this using one of the new formulae in 6.5:

XL3SetProperty( ObjectType, ObjectName, Property, Arg1, [Arg2],…, [Arg27] )

The formula to drive the chart axis from a range is simply:

=XL3SetProperty("Chart","Chart 1","YMin",$C$1)

Other options are:

PropertyDescriptionValue
“YMin” or “YMax”Sets the limits of the Y Axis.Numeric
“Y2Min” or “Y2Max”Sets the limits of the Y2 Axis.Numeric
“XMin” or “XMax”Sets the limits of the X Axis.Numeric
“X2Min” or “X2Max”Sets the limits of the X2 Axis.Numeric

Now finally we can build reports (and publish them to the Web), confident that regardless of the data or criteria selected  we aren’t going to end up with a line chart starting at 0 and bunching all the lines together.

This formula can also be used to modify various aspects of our own grids, slicers & small multiples based on the values of excel cells. The kind of things that we and our customers wanted to achieve were things like:

  • Move  dimensions between axes
  • Change the member selection types
  • Modify various grid properties based on different formulae

Lets look how the formula works to do some of these things:

=XL3SetProperty("Grid","My Grid","HierarchiesOnColumns","[Products]","[Regions]", $a$1)

Would move the Product, Region and whichever hierarchy is in $a$1 to the columns (I could use a slicer or drop down to update $a$1 to let the user switch between various hierarchies)

=XL3SetProperty("Grid","My Grid","RemoveEmptyRows",$b$1)

Would toggle whether to display rows without data based on the value of $b$1

If there are any aspects of Excel that you think would be useful to drive from a range, please let us know!

2011 Dashboard Competition

A slight departure from the normal blogging to let everyone know about the latest developments in XLCubed and to talk about a new dashboard competition with the chance to win an iPad 2!

Dashboard Design Competition

XLCubed are sponsoring Dashboard Insight’s first dashboard design contest. The competition is based on a provided data set, and we’d encourage as many as can to enter.

We believe that XLCubed offers a class-leading dashboard development environment, with fine grained control over chart and table sizing, and we’re looking forward to seeing some great dashboards. Take a look at some of our previous winners for inspiration.

Don’t forget that this blog also contains lots of helpful information that should help you come up with a great dashboard design.

We’ll provide entrants with the sample data set in a local cube format to fully exploit the strengths of XLCubed. Entry is open to customers and non-customers alike, and your dashboard skills can win you a shiny new iPad 2. Good luck if you choose to enter.

 

XLCubed v6.5

Version 6.5 is due for release in early October. Originally scheduled as 6.2, we decided it contains so much over the current version that it deserved a bigger billing. New for 6.5 are:

 

  • iPad / iPhone app – XLCubed web reports have always worked on smartphones and tablets. However our app brings an intuitive iPad optimised user experience to report navigation and selection.

  • Mapping – Integrated point and shape based mapping in Excel and on the web.
  • Scheduling – email delivery of XLCubed web reports by pdf or Excel. Schedules can be controlled by period, or by data exception.
  • Sharepoint WebPart – customers have been using XLCubed Web reports in SharePoint for a number of years, but we now introduce a dedicated WebPart to make the process simpler and provide greater flexibility and depth of integration.
  • Away from the headline items there are a number of significant smaller enhancements which make 6.5 another big step forward for us. We’re looking forward to bringing it to market. For an early test drive, contact us along with your specific area of interest at support@xlcubed.com.

Lastly we’d like to welcome Cardinal Solutions Group to our partner program. Cardinal operate in North Carolina and Ohio and are one of a select few Microsoft Managed Partners in the U.S. East and Central Regions. We look forward to working together with new and existing customers.

Warning: Excel can get Volatile

Excel is a great tool for dashboard/report delivery and design (it’s why we created our addin in the first place), but there is a hidden performance trap:

Offset, Now, Today, Cell, Indirect, Info and Rand

If you’ve ever used any of these formulae, you may have noticed that whenever you change a cell, or collapse/expand a data grouping, Excel recalculates. That is because these are VOLATILE formulae, as soon as you use one of these, Excel will enter a mode where everything is always recalculating, and for good reason.

Offset & Now are the formulae we see used most often. Let’s look at each of these in turn and talk about some alternate approaches to avoid this issue.

Offset

This is by far the most common of these danger formulae that we see in use. Here’s the formula definition:

=Offset(reference,rows,cols,height,width)
Returns a reference to a range that is a given number of rows and columns 
from a given reference.

We typically see these as part of a named range definition for driving chart source data – it allows the number of rows/columns driving the chart data to change automatically; a not unusual requirement when it comes to building reports (especially when a report contains some user defined filters or slicers). Here’s an example:

 

 

 

 

 

 

A very simple spreadsheet – we can type the number of months to display in the chart. In reality the number of months to display will probably be driven by the data available for the criteria selected. The screenshot already shows the issue we have –  the chart is setup to display a max of 12 months, but we only have 3 months of data available.

 

The most obvious approach is to use the Offset formula to pick the chart area to use automatically, we could create a named range such as:

 

 

 

 

 

 

Now we just change the chart data source to be the named range:

 

 

 

 

The chart is now plotting 3 months, but will automatically update to show the required number of months:

BUT we have now used a volatile formula –  although this is a simple workbook, we are now in a position where Excel is going to have to recalculate everything all the time. It’s probably a good time to look at why Excel is going to do that. Let’s have a look at very simple formula to understand how Excel recalculates things.

Consider the formula:

C1    =A1 + B1

We can see that C1 is dependent upon A1 & B1 – so whenever a value in either of these cells changes C1 will need to be recalculated to show the correct answer. Excel knows about this dependency because it maintains a dependency tree; it knows which cells need to be recalculated whenever any other cell changes. This is a very efficient way of working, if a workbook has thousands of formula, but only one values changes, and this only needs 10 of these formula to recalculate, then only 10 will be calculated.

If C1 contained:

C1    =Sum(A1:A20)

We know that C1 depends upon any of the cells A1:A20, and so does Excel. But what if C1 was:

C1    =Sum(Offset(A1,0,0,B1,1))

Which cells is C1 dependent upon? At a glance you could say A1 & B1.

 

 

 

 

 

 

but  B1 contains the number 20, so actually C1 is dependent upon A1:A20 and B1 (I’ve highlighted the additional cells that are dependent):

 

 

 

 

 

 

 

Just as we can’t see at a glance which cells C1 needs – Excel also can’t easily decide that. Therefore, Offset is volatile because, if it wasn’t then there is a danger that Excel would take so long to work out if it needs to be calculated that it might as well always calculate it.

There is an easy solution to this, INDEX. Here’s the formula definition (be careful, there are 2 ways to use Index, we want the REFERENCE one):

=Index(reference,row_num,column_num,area_num)
Returns a value of reference of the cell at the intersection of a 
particular row and column, in a given range
The big difference, compared to Offset, is that Index is going to return a single cell reference, so you need to use it as part of a range selection A1:Index(…). Here’s the same “Offset” Sum redefined as an “Index”:
C1    =SUM(A1:INDEX(A1:A20,B1,0))

The formula is simply saying the range we want starts at A1 and goes down the number of rows set in B1. The crucial difference is that the Index functions knows that A1:A20 is the maximum range we are likely to look at and therefore the dependencies are known just by looking at the formula itself:

We can now update the Named Range to use the Index function instead:

=Sheet1!$C$6:INDEX(Sheet1!$C$6:$C$17,Sheet1!$D$2,0)

 

 

Now/Today

The Now and Today functions return the current date to a cell – this is generally used so that when a report is loaded it will always show the data based on “Today”. Whilst this is not an unreasonable thing to want to do,  in reality what most people want is for the report to run for the most recent data, which could actually mean a number of things:

  • Yesterday (if the data is built in a nightly process)
  • The last working day (if the source transactional system is only used during office hours)
  • Current month etc.

The easiest solution is to let the data determine the date to use – if we use an XLCubed Grid or Query Table to retrieve the data we can simply setup a grid to retrieve the days/months where there is data:

And use the Sort option “Reverse” to display the most recent data first:

With the grid set to “Refresh on Open”  we know that A6 will always have the most recent date available in the cube and can base the rest of the report off that cell.

Incidentally, V6.2 of XLCubed introduces a new option to Slicers to automatically select the most recent date member when the report is loaded:

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.