Sets or updates the top N filter.
Syntax
Parameters
- levelOrAttributeUniqueName
- The affected attribute or hierarchy level.
- constraint
- The top N filter's constraints.
Return Value
A reference to this instance after the operation has completed.
Example
The following code demonstrates how to create the value filter.
| C# | Copy Code |
|---|
using (ILayoutActions la = pivotView.BeginLayoutUpdate("Set Top N Filter"))
{
string attribute = "[Order Date].[Date]";162>
string measure = "[Measures].[Total Product Cost]";
// add some attribute to the Column
la.AppendField(attribute, ShelfKind.ColumnShelf)
// set bottom 20 order count percents filter
.SetFilter(attribute, Value.WithMeasure(measure).BottomPercent(20))
.Commit();
} |
Requirements
Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2
See Also