[rsAggregateOfMixedDataTypes] The Value expression for ‘x’ uses an aggregate function on data of varying data types. Aggregate functions other than First, Last, Previous, Count, and CountDistinct can only aggregate data of a single data type

Yet another irritating error message from reporting services 🙂

You will typically get that error, when you try to create a calculated member in the visual designer like so:

IIF( [Measures].[x]=0 , [Measures].[y] , 0,00)

And then use the SUM or another aggregate function on the new measure.

If you create the same calculated member in pure MDX, and run it in for instance management studio, it will not yield any errors. Like so:

WITH MEMBER [Measures].[z] AS
IIF( [Measures].[x]=0 ,
[Measures].[y] , 0,00)

Just to describe the calculated member in words. If the measure x equals 0, then the new measure z will be the value of the measure y, and if the measure x not equals 0, then the new measure z will take the value of 0,00.
The problem is that, when reporting services SUM the new measure z, it Sums data from y and 0,00, and reporting services will in some cases see the values as different data types. In my example the measure x was a decimal, and reporting services interpreted the 0,00 as an integer.

To avoid this problem, you have to tell reporting services that 0,00 is a decimal like this:

IIF( [Measures].[x]=0 , [Measures].[y] ,  Cdec(  0,00))

What BI frontend tool in Sharepoint 2010 should I use?

In regards to my earlier link to the power pivot blog post, that compared analysis services to power pivot, and discussed when to use what, I also have to throw in a link that compares all the front end BI tools in sharepoint 2010, and discuss when to use what there.

You can find a great overview of the frontend tools here:


There are a lot of possibilities, and my short advice is: Don’t try to use them all at once, even though you think you have a big project, which needs it all. Start by identifying what tool you need the most. You will properly be able to create most of what you need with that. Don’t throw a lot of different reports after the users. They will be confused when they get more advanced drill through possibilities in performance point services, than they for instance do in an excel services report, and they will get confused when they can’t export their performance point services report to PDF, the same way they can with for instance reporting services.

Comparing Analysis Services and Power Pivot

We are in a period in time where MS soon will be releasing a lot of (new) BI technologies, such as sharepoint 2010 which contains among other things: excel services, performance point services and hosting of powerpivot. I guess office 2010 will be released the same date as sharepoint 2010, and here we also have a lot of new stuff, especially in Excel (where we also have the power pivot plug-in). SQL server 2008 R2 will also soon be released.

Working as a consultant I have experienced some confusion about when to use what technology, both from customers and BI developers.

To clarify some of it, the powerpivot team has created a great blog post that compares analysis services to powerpivot, and discusses when to use what.

Read it here: http://blogs.msdn.com/powerpivot/archive/2010/03/12/comparing-analysis-services-and-powerpivot.aspx

Enjoy 🙂

Introduction to Business Intelligence from a developer point of view – part 0

This is the first part of Introduction to BI.

Before I start with the actual Introduction to BI, I would like to start with an introduction of myself, to clarify what I will be focusing on in this article series.

The last couple of years I have been working with BI on the MS platform, spanning from analyzing source system, over ETL design with SSIS, designing Enterprise data warehouses and data marts, designing SQL Server analysis services cubes to developing frontends with various frontend tools.

Before I entered the world of BI, I started as software consultant developing distributed enterprise applications typically handling input from a massive amount of users and/or devices. It was the designing of the software, so that it would react in with the same speed, no matter if 1 or 1000 users accessed it on the same time that triggered me. 

I soon learned that the information created by the users was of great importance; not only to the users using the system, but also to their managers and leaders, and that we not always could provide the desired data to them. We could create hardcoded reports of the data in our software, to show the data, but there was a lot of thing we couldn’t do, like:

  • Let the user explore the data to try to find information of great importance, like comparing data from a single day, a single region, a single product, with the same thing from another region or time.
  • Using data from different system in the reports.
  • Keeping another security model in the reports than in than in the OLTP systems.
  • Keeping the responsiveness of the reports fast when the data grew to millions of records.
  • Handling history.
  • Displaying trends in the data to the users.

And I could go on about with things we couldn’t do, but I hope some of it will become clear in this article series, where I will try to explain what BI is from a technical point of view, and how a BI solution is designed.  It was the desire to handle this information as an asset, which drove me towards working with BI.

The title of the article series is: Introduction to Business Intelligence from a developer point of view. With developer I mean both a software developer, that designs traditional OLTP systems and wants to learn more about BI, and a BI developer, who might want some insight/inspiration/input about how to design a complete BI solution. 

So what articles will this article series contain, and what will they be about:

Part 0: IntroductionIntroduction to the article series (Yes, you are reading it right now)
Part 1: Defining Business IntelligenceIn this article I will define precisely what Business Intelligence is, or at least what I mean by it.
Part 2: The Enterprise Data ware houseHere I will discuss what an Enterprise Data ware house is and why or why not you will need a DWH to your BI solution. I will also describe different modeling techniques.
Part 3: The Datamart Here datamarts will be explained, and here I will also explain different modeling techniques.
Part 4: Frontend toolsThe current state of frontend tools to BI.
Part 5: BI 2.0What is BI 2.0, and is the EDW dead?

Well, that is at least what I have planned for now.  There could come more, such as for instance about handling history, different data mining techniques and maybe about the MS toolbox to building data warehouses.

I will try to keep the articles short, precise and easy and fast to read. In my every day work, I work with MS tools, so the articles will be colored by that.

That is it for now.

Acronym list
BI: Business intelligence
EDW: Enterprise data ware house
MS: Microsoft.
SSIS: SQL server integration services.
SSAS: SQL server analysis services.
ETL: Extract Transform Load.
OLTP Systems: Online transaction processing systems.