Data-driven Time filters in PerformancePoint M&A

by keruibo 2. June 2008 00:32

Recently I've been working on methods to display time filters in PerformancePoint M&A that are more user-friendly and efficient for users.  The conventional alternatives--Member Selection, Time Intelligence Post-Back and Time Intelligence Filter--have their strengths, and all of them are user friendly!  However I find that often the underlying data structure doesn't fit with the design of these filter tools.

The fundamental problem I seem to encounter most often is that the data in the average cube isn't "as of" the current system date and/or the [Time] dimension extends well beyond the last date/time used in the data set.  For example, a cube may be processed daily, and the [Last Order Date] is yesterday, but the [Time] dimension extends one year in the future (to support forecasting, perhaps).

So, if the last date of the data is Friday, and today is Monday, how can we make our [Time] dimension filter selection default to Friday?  For Time Intelligence, Day-1 in this scenario is Sunday...that's not what our uses expect!  We could just select the last day in the [Time] dimension using an MDX filter...except that often the [Time] dimension extends out in the future, and our users don't want to default to a future date!

What we really need is a way to fill our [Time] filter with valid members, and pre-select the most logical one.  This way our users will always see valid, sensible data upon loading the dashboard.  Unfortunately, as far as I've been able to determine, none of the built-in Filters will support the scenario outlined above without some intermediate/advanced MDX work. 

What we really need is a dynamic date selector that doesn't use the computer system clock, but rather uses knowledge of the data in our data source.  At our firm we've addressed this for clients in some cases by building in calculated members to our Time hierarchies, or with named sets.  This works OK, but it still hasn't completely solved the problem because it's still tough to control what the default selection is going to be.  So, in this article I'll explore another way I went about this using fairly straightforward MDX. 

Some people aren't that comfortable with MDX.  If you're one of them, don't worry too much, because the template outlined below is pretty simple and you can probably use it without fully undertanding what's happening under the hood.

To use this method, the following should be true:

  • The solution is based on a single Analysis Services data source (a cube).  If you have multiple data sources, you need to use the Time Intelligence filters.
  • The default measure in the cube is NULL for dates after the filter's desired "as of date"

The basic technique here is to use the MDX filter type in PerformancePoint, and tune the MDX to return exactly the members we want in the list.  Unfortunately there's no way to specify to the PerformancePoint MDX Filter which member should be the default (I don't know why, since the Member Selection filter type allows this..feature request anyone?).  So, we just have to make sure the first thing that's returned by the MDX query is what we want as a default. 

Let's implement two scenarios:

  1. A list of months, in descending order, with the last month for which there is data available first
  2. The current month, current quarter, and current year--again with "current" defined by the last [Time] periods that have data in the cube 

First, take a look at MDX statements that will return these member sets.  This is just plain MDX you can experiment with in any MDX front-end application, such as SQL Management Studio.

This first query returns a list of all Months in the [Time] hierarchy, and reverses the order so the last month is first. For example: {Dec-08, Nov-08, ..., Jan-08}

SELECT
NONEMPTY (Order([Time].[Time Hierarchy].[Month].AllMembers,
 RANK([Time].[Time Hierarchy].CurrentMember,
   [Time].[Time Hierarchy].[Month].AllMembers),
   BDESC)) ON COLUMNS
FROM [Sales Cube]

Using this query, we'll generate a filter that looks something like this:

 

This second query returns members from different levels--the last Month, Quarter and Year for which we have data.  For example: {May 08, Q2-08, 2008}

SELECT
{
 TAIL(NONEMPTY ([Time].[Time Hierarchy].[Month].AllMembers)).Item(0),
 TAIL(NONEMPTY ([Time].[Time Hierarchy].[Quarter].AllMembers)).Item(0),
 TAIL(NONEMPTY ([Time].[Time Hierarchy].[Year].AllMembers)).Item(0),
} ON COLUMNS
FROM [Sales Cube]

We'll use this query to generate a filter that looks something like this:

 

So how do these queries know where the fact data ends? Well, I've cheated actually. These queries work as presented because they will automatically intersect with whatever the default measure is within the cube, and any NULL tuples will be filtered out by the NONEMPTY keyword.  If your default measure doesn't align with what you consider the "data as of" date, you'll have a bit more MDX work to do...you need to add a specific measure to the MDX in that case (see the MDX documentation for a syntax diagram).

You'll need to tweak these queries to work with your own data, but your MDX should be pretty close to these examples.

With the queries tested, simply paste them into a standard PerformancePoint M&A MDX filter definition.  To do so, follow these steps:

  1. Create a new query, selecting the MDX Query filter template 

  2. In the Enter MDX Formula edit box, paste the contents of one of the above queries, leaving out the SELECT, ON COLUMNS and FROM clauses.

  3. Save the filter
  4. Add the filter to a dashboard, and use it as any other filter

Well, that's it!  The second example is especially flexible, as you can use just about any MDX you want to use to add new items to the list.  Just be certain that any member returned in the query is from the [Time].[Time Hierarchy]...if it's not, your filter targets probably won't know what to do with them and the solution won't work!

While this tutorial deals with a [Time] hierarchy, you can probably see that the same idea can be applied in other ways.  MDX has many powerful functions and methods you can leverage to make filter sets more intelligent--which is a great way to make our users' experience with BI solutions simpler and more intuitive. 

 

 

Tags: ,

PerformancePoint

Comments


January 19. 2010 12:41
Many receive advice, only the wise profit from it.


February 5. 2010 14:40
The best vision is insight.


February 13. 2010 16:25
Many receive advice, only the wise profit from it.


February 20. 2010 14:56
This is a good piece of writing, I was wondering if I could use this piece of writing on my website, I will link it back to your website though. If this is a problem please let me know and I will take it down right away.


February 20. 2010 20:59
This is a fantastic post, but I was wondering how do I suscribe to the RSS feed?


February 21. 2010 14:51
Amazing site, where did you come up with the info in this post? Im glad I found it though, ill be checking back soon to see what other articles you have.


February 21. 2010 20:07
This is a good blog, I found your blog page researching bing for a related content and came to this. I couldnt find to much alternative material on this blog, so it was nice to locate this one. I will likely end up being returning to check out some other articles that you have another time.


February 21. 2010 23:51
This is a good write-up, I was wondering if I could use this piece of content on my website, I will link it back to your website though. If this is a problem please let me know and I will take it down right away.


February 22. 2010 04:42
This is a really good post, but I was wondering how do I suscribe to the RSS feed?


February 22. 2010 07:26
I don't agree with everything in this write-up, but you do make some very good points. I'm very interested in this subject and I myself do alot of research as well. Either way it was a well thoughtout and nice read so I figured I would leave you a comment. Feel free to check out my website sometime and let me know what you think.


February 22. 2010 15:50
I have read a few of the articles on your website now, and I really like your style of blogging. I added it to my favorites blog site list and will be checking back soon. Please check out my site as well and let me know what you think.


February 22. 2010 18:59
This is a good piece of writing, I was wondering if I could use this summary on my website, I will link it back to your website though. If this is a problem please let me know and I will take it down right away.


February 22. 2010 23:26
This is a excellent post, but I was wondering how do I suscribe to the RSS feed?


February 23. 2010 01:56
I have read a few of the articles on your website now, and I really like your style of blogging. I added it to my favorites web site list and will be checking back soon. Please check out my site as well and let me know what you think.


February 23. 2010 02:49
Just found this article on Google - do you have any other related posts?


February 23. 2010 21:15
I don't agree with everything in this write-up, but you do make some very good points. Im very interested in this subject matter and I myself do alot of research as well. Either way it was a well thoughtout and nice read so I figured I would leave you a comment. Feel free to check out my website sometime and let me know what you think.


February 23. 2010 23:40
This is a good post, I was wondering if I could use this blog on my website, I will link it back to your website though. If this is a problem please let me know and I will take it down right away.


February 24. 2010 02:12
Howdy, I was searching the web  and I discovered your web site. Keep up the great work.


February 24. 2010 04:36
Superb site, where did you come up with the info in this post? I'm pleased I found it though, ill be checking back soon to see what other articles you have.


February 24. 2010 07:02
This is a really good piece, I discovered your blog site looking around google for a similar topic and came to this. I couldnt find to much alternative info on this write-up, so it was wonderful to find this one. I likely will be back to check out some other articles that you have another time.


February 24. 2010 13:39
Outstanding site, where did you come up with the information in this write-up? I'm pleased I found it though, ill be checking back soon to see what other articles you have.


February 24. 2010 18:51
I don't agree with everything in this summary, but you do make some very good points. I'm very interested in this subject and I myself do alot of research as well. Either way it was a well thoughtout and nice read so I figured I would leave you a comment. Feel free to check out my website sometime and let me know what you think.


February 24. 2010 23:43
I completely agree with the above comment, the internet is with a doubt growing into the most important medium of communication across the globe and its due to sites like this that ideas are spreading so quickly.


February 25. 2010 00:43
Great thread.  Enjoyed the posts..


February 25. 2010 01:28
Hi everybody. Interesting idea for a blog. I have been searching the Internet for fun when I found your website. Great post. Thanks a lot for sharing your knowledge! It is great to know that some people still put in an effort into handling their websites. I'll be sure to check back from time to time.


February 26. 2010 14:23
What a super blog!


February 26. 2010 20:55
Admiring the time and effort you put into your blog and detailed information you offer! I will bookmark your blog and have my children check up here often. Thumbs up!


February 26. 2010 23:15
I don't agree with everything in this write-up, but you do make some very good points. Im very interested in this topic and I myself do alot of research as well. Either way it was a well thoughtout and nice read so I figured I would leave you a comment. Feel free to check out my website sometime and let me know what you think.


February 27. 2010 02:10
I have read a few of the articles on your website now, and I really like your style of blogging. I added it to my favorites blog list and will be checking back soon. Please check out my site as well and let me know what you think.


February 27. 2010 07:56
This is a outstanding post, but I was wondering how do I suscribe to the RSS feed?


February 27. 2010 09:53
I'm  searching for some information regarding Copyright as I am being sued. What websites are helpful  ??


February 27. 2010 11:31
I have read a few of the articles on your website now, and I really like your style of blogging. I added it to my favorites blog list and will be checking back soon. Please check out my site as well and let me know what you think.


February 27. 2010 15:50
This is a really good post, but I was wondering how do I suscribe to the RSS feed?


February 27. 2010 19:58
I'm pleased I found this blog site, I couldnt locate any information on this matter prior to. I also operate a website and if you wish to ever serious in doing a bit of guest writing for me make sure you feel free to let me know, im always look for people to check out my blog site. Please stop by and leave a comment sometime!


February 27. 2010 22:02
I have read a few of the articles on your website now, and I really like your style of blogging. I added it to my favorites website list and will be checking back soon. Please check out my site as well and let me know what you think.


February 27. 2010 23:34
Just wanted to say that you have some awesome content on your website. If it's allowed I would like to use some of the information you provided on my blog. If I link back to this page do I have your permission to do so?


February 28. 2010 02:34
I have read a few of the articles on your website now, and I really like your style of blogging. I added it to my favorites website list and will be checking back soon. Please check out my site as well and let me know what you think.


February 28. 2010 16:06
Do you think you have STD symptoms?  See pictures here http://www.std-symptom.info and to find STD testing.


March 1. 2010 04:15
Should I get a Virtual Private Server?  I am using ixwebhosting but they keep shutting me down because of high server load. Im getting about 4,000 UV a day. What hosting should I get?


March 1. 2010 06:55
Sorry but my english language isn't good. i just intend to say i like this article very much. say thank you


You address truth issue on that topic. For me you handled it in a professional way. I hope you will continue  this way, with your marvellous way of writing articles


March 2. 2010 16:59
Hi.Forgive me if my english isn't nice.anyway i  want to say  i like this post very much. thank you!


March 2. 2010 22:55
Hands down, Apple's app store wins by a mile. It's a huge selection of all sorts of apps vs a rather sad selection of a handful for Zune. Microsoft has plans, especially in the realm of games, but I'm not sure I'd want to bet on the future if this aspect is important to you. The iPod is a much better choice in that case. <a href= www.bestmoviestrailer.com/star-trek-2009/>star trek ships</a>


March 3. 2010 04:03
Exceptional site, where did you come up with the information in this piece? Im glad I found it though, ill be checking back soon to see what other articles you have.


March 3. 2010 23:32
WoW Mobiles is awesome! I get free mobile service with t-mobile because I refered 3 people to wow. You can too!


March 4. 2010 01:44
WoW Mobile is awesome! I get free mobile service with t-mobile because I refered 3 people to wow. You can too!


March 4. 2010 15:13
Hey there,
I  love this weblog. Google sent me here. I  found so much <B>good imformation</B> here.
Will surely visit it again.


March 4. 2010 18:36
I love streaming movies online, it is way easier than going to the theaters.


March 4. 2010 18:36
I love watching movies online, it is way cheaper than going to the theaters.


March 5. 2010 05:33
WOW!!! I am speechless… you ROCK. I hope this goes far and wide, you deserve it.


United States paul 
March 5. 2010 18:47
Rob, A big thank you goes out to you! I said a prayer and your instructions came thru! You are the man!


March 6. 2010 04:58
Fantastic post! This could aid lots of people find out about this matter. Do you want to incorporate video clips together with these? It could undoubtedly help out. Your reason was spot on and owing to you; I probably won't have to describe everything to my pals. I can simply direct them here


March 6. 2010 14:45
Please let me know if you are fascinated to business as article communicator for me? I can act $10/article.




Regards
Jones





March 6. 2010 15:32
To start, allow me to point out that your internet site is fantastic. I love the theme that you have. It was very easy on the eyes. Appreciate your article too. Definitely subscribed to your feed to make sure I won't be missing out on any updates. Excellent job! Toast to a productive business


March 6. 2010 17:05
I am quite newsworthy in this theme comic you testament elaborate more on it in coming posts.


Regards
Wade









March 6. 2010 17:22
Valuable information and excellent design you got here! I would like to thank you for sharing your thoughts and time into the stuff you post.



March 6. 2010 17:28
Resources like the one you mentioned here will be very useful to me! I will post a link to this page on my blog. I am sure my visitors will find that very useful.


March 6. 2010 17:28
I admire the valuable information you offer in your articles. I will bookmark your blog and have my children check up here often. I am quite sure they will learn lots of new stuff here than anybody else!


March 9. 2010 23:33
Do you know which cell phone services allow tethering?


March 9. 2010 23:33
Do you know which cell phone services allow tethering?


March 10. 2010 07:05
Hey webmaster, fantastic blog post.. Please continue this great work..


March 10. 2010 09:00
I was wondering what is up with that weird gravatar??? I know 5am is early and I'm not looking my best at that hour, but I hope I don't look like this! I might however make that face if I'm asked to do 100 pushups. lol


March 10. 2010 19:07
Just wanted to give you a shout from the valley of the sun, great information. Much appreciated.


March 10. 2010 23:43
This is a very important post, I was looking for this knowledge. Just so you know I discovered your web site when I was browsing for blogs like mine, so please check out my site sometime and leave me a comment to let me know what you think.


March 11. 2010 03:40
The blog was absolutely fantastic! Lots of great information and inspiration, both of which we all need!


March 11. 2010 05:01
I imagine you hold to alter a bit the figure and usability of your blog.

Regards
Smith





March 11. 2010 07:07
I admire what you have done here. I like the part where you say you are doing this to give back but I would assume by all the comments that this is working for you as well.


March 12. 2010 01:16
If you are having tax problems, find a tax lawyer here http://www.thebiglawyerdirectory.com tax lawyer directory


March 12. 2010 02:10
Thanks for taking the time to discuss this, I feel strongly about it and love learning more on this topic. If possible, as you gain expertise, would you mind updating your blog with more information? It is extremely helpful for me.


March 12. 2010 15:15
Heard about this site from my friend. He pointed me here and told me I’d find what I need. He was right! I got all the questions I had, answered. Didn’t even take long to find it. Love the fact that you made it so easy for people like me. More power

Add comment




  Country flag

biuquote
  • Comment
  • Preview
Loading



Disclaimer
The opinions expressed herein are my own personal opinions and do not represent my employer's view in anyway.

© Copyright 2010 Rob Kerr's BI Blog