We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
Unfortunately, activation email could not send to your email. Please try again.
Essential JS2

Syncfusion jQuery based widgets are no longer in active development. Switch to our pure JavaScript based next generation Essential JS 2 library.

Syncfusion Feedback

How to apply filter on percentage values through the OlapReport?

Platform: jQuery |
Control: ejPivotGrid

This KB illustrates that how to apply filter on percentage values through the OlapReport.


Generally, MDX query does not carry values having % symbol (for example, 15%) and so the filter operations using such values do not work properly. To overcome this problem, use fractional value to set the filter operand.  For example, you need to set 15% as 0.15.  Refer to the following OLAP Report that illustrates how to set the fractional value for filtering. 


OlapReport olapReport = new OlapReport();
olapReport.Name = "Customer Report";
olapReport.CurrentCubeName = "Adventure Works";
DimensionElement dimensionElementColumn = new DimensionElement();
dimensionElementColumn.Name = "Customer";
dimensionElementColumn.AddLevel("Customer Geography", "Country");
MeasureElements measureElementColumn = new MeasureElements();
measureElementColumn.Elements.Add(new MeasureElement { Name = "Internet Sales Amount" });
DimensionElement dimensionElementRow = new DimensionElement();
dimensionElementRow.Name = " Product";
dimensionElementRow.AddLevel("Product Categories", "Category");
FilterElement filterElement = new FilterElement(AxisPosition.Categorical);
filterElement.FilterCase = FilterCase.GreaterThan;
filterElement.FilterValue.Add(new MeasureElement { Name = "Internet Sales Amount", Visible = true });
filterElement.FilterValue.Add(new FilterValue { Filter_Value = 0.02 });
filterElement.IsFilterCondition = true;
olapReport.CategoricalElements.IsFilterOrSortOn = true;



Dim olapReport As OlapReport = New OlapReport()
olapReport.Name = "Customer Report"
olapReport.CurrentCubeName = "Adventure Works"
Dim dimensionElementColumn As DimensionElement = New DimensionElement()
dimensionElementColumn.Name = "Customer"
dimensionElementColumn.AddLevel("Customer Geography", "Country")
Dim measureElementColumn As MeasureElements = New MeasureElements()
measureElementColumn.Elements.Add(New MeasureElement With {.Name = "Internet Sales Amount"})
Dim dimensionElementRow As DimensionElement = New DimensionElement()
dimensionElementRow.Name = " Product"
dimensionElementRow.AddLevel("Product Categories", "Category")
Dim filterElement As FilterElement = New FilterElement(AxisPosition.Categorical)
filterElement.FilterCase = FilterCase.GreaterThan
filterElement.FilterValue.Add(New MeasureElement With {.Name = "Internet Sales Amount", .Visible = True})
filterElement.FilterValue.Add(New FilterValue With {.Filter_Value = 0.02})
filterElement.IsFilterCondition = True
olapReport.CategoricalElements.IsFilterOrSortOn = True


You must log in to leave a comment

Please sign in to access our KB

This page will automatically be redirected to the sign-in page in 10 seconds.

Up arrow icon

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile