Andy Hayler’s Blog
My session at the PASS European Conference 2006
SQL2005 Books Online December Update
New articles from Chris Harrington
Parameterising by Measures in Reporting Services 2005
WITH
SET MYSET AS HEAD([Date].[Date].[Date].MEMBERS, COUNT(MEASURES.ALLMEMBERS)-1)
MEMBER MEASURES.MeasureUniqueName AS
MEASURES.ALLMEMBERS.ITEM(
RANK(
[Date].[Date].CURRENTMEMBER, MYSET
)-1
).UNIQUENAME
MEMBER MEASURES.MeasureDisplayName AS
MEASURES.ALLMEMBERS.ITEM(
RANK(
[Date].[Date].CURRENTMEMBER, MYSET
)-1
).NAME
SELECT {MEASURES.MeasureUniqueName, MEASURES.MeasureDisplayName} ON 0,
MYSET ON 1
FROM [Adventure Works]
MEMBER MEASURES.SELECTEDMEASURE AS STRTOMEMBER(@MyMeasure, CONSTRAINED) SELECT NON EMPTY { MEASURES.SELECTEDMEASURE} ON COLUMNS, NON EMPTY { ([Date].[Calendar Year].[Calendar Year].ALLMEMBERS ) } DIMENSION PROPERTIES MEMBER_CAPTION, MEMBER_UNIQUE_NAME ON ROWS FROM [Adventure Works] CELL PROPERTIES VALUE
- Parameter as the name of your parameter, without the leading @. So in our example it would be MyMeasure
- Dimension needs to be left blank – the Measures dimension doesn’t appear on the dropdown list
- Hierarchy needs to be blank too
- Multiple Values needs to be left unchecked
- Default must be entered, but you can use an expression such as MEASURES.DEFAULTMEMBER
Thanks go to my colleague Tony for working this last bit out.
You can then bind this query to a table in your report and select different measures to slice by. Hope this helps!
Dejan Sarka on AS2005 stored procedures
Podcast #1: Nigel Pendse
A while ago I decided that it would be cool to jump on the podcasting bandwagon, and here’s my first attempt. I was very lucky to get Nigel Pendse to chat with me about the impact that SQL2005/AS2005 will have on the BI market as a whole; if you don’t know who Nigel is he’s the man behind the OLAP Report and the OLAP Survey, both of which are great sources of competitive intelligence if you’re a software vendor or consultancy, and also a very popular speaker at conferences and seminars. He has a lot of interesting and intelligent observations to make in my opinion.
Anyway, here’s where to get the podcast (it’s about 25 minutes long and in mp3 form):
http://www.ourmedia.org/node/108782
Apologies for the rather amateurish production…
If you think this is a worthwhile undertaking, I’ll start thinking of people to ask to interview for future podcasts. Let me know what you think!
Excel 12 BI first impressions
Do you know anyone Scottish?
- Open SQL Server Management Studio
- Connect to the AdventureWorks cube
- Run the following query:
select [Measures].[Internet Sales Amount]
on 0,
[Geography].[Geography].[State-Province].[England].children
on 1
from [Adventure Works] - Scroll down the result set and point out that according to AdventureWorks, Scotland is a city in England.