Implement From Date and To Date Range for PerformancePoint 2010 Scorecard
I’m always asking by customers how we can implement a date range with PerformancePoint scorecard.
In all other objects in PerformancePoint we can do it (Analytic Grid & Chart, Reporting services etc…).
So, I decide to implement a scorecard transformation to do it, most of times we implement a scorecard transformation to extend the scorecard behavior.
In this solution I had a basic assumption that there are 3 date filters in addition to other filters.
All of them had to load the same hierarchy.
Order of filters:
The order of the filters in the page is not relevant, the order of the (Filter Links - web part links) is important.
For example if we have: Product & Promotion filters the order to link the scorecard is the following: Final Date, From Date, To Date, Product, Promotion.
All the filters can implement any UI objects (Tree, Multi Select Tree etc.)
The final date filter will be read only so we will implement it with List (Combo Box) with a single value (for example the hierarchy All Member, the extension will override the value of final date.
The following screenshots describes conceptual workflow:
The extension will collect from & to date unique name values and create the where clause and then remove both from & to date filters.
How the code works?
Scorecard transformation has 4 main override event properties:
I implemented the Pre Query method, I control the filter collection and then everything behaves the default.
public GridViewTransformType GetTransformType() { return GridViewTransformType.PreQuery; }
The code does other two steps:
Be aware that multi select is not supported (data range have to be single value to single value).
Installation steps:
<appSettings>
<add key="ScorecardViewId" value="The GUID…" />
</appSettings>
<add key="RangeCreator" value="Microsoft.PerformancePoint.SDK.Samples.ScorecardTransforms.PreQuery.RangeCreatorTransform, Microsoft.PerformancePoint.SDK.Samples.RangeCreatorTransform, Version=14.0.0.0, Culture=neutral, PublicKeyToken=fa525c8383a44a52"/>
Be awere that FilterEmptyRows extension will be the last one, PPS product team add the remark.
<!-- FilterEmptyRows should allways be the last transform in this list -->
Good luck