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.
Unfortunately, activation email could not send to your email. Please try again.

Sử dụng FilterElement cho nhiều Measure như nào ?

Thread ID:





125099 Jul 21,2016 06:33 AM Jul 22,2016 08:17 AM ASP.NET Web Forms (Classic) 1
Tags: OlapClient
Asked On July 21, 2016 06:33 AM

Tôi sử dụng nhiều Measure trong vùng Categorical, ví dụ: Internet Sales Amount và Internet Tax Amount
Giờ tôi muốn lọc giá trị của từng Measure, Ví dụ: Internet Sales Amount > 270,000,000 và Internet Tax Amount > 500,000,000 thì làm như thế nào ?
Code dưới đây để lọc Internet Tax Amount > 270,000,000
//Creating Measure Element
MeasureElements measureElementColumn = new MeasureElements();
measureElementColumn.Elements.Add(new MeasureElement { Name ="Internet Sales Amount" });

DimensionElement dimensionElementRow = new DimensionElement();
//Specifying the Dimension Name
dimensionElementRow.Name = "Date";
dimensionElementRow.AddLevel("Fiscal", "Fiscal Year");
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 = 270000000.00 });
filterElement.IsFilterCondition = true;
/// Adding Column Members
olapReport.CategoricalElements.Add(new Item { ElementValue = 
dimensionElementColumn });
olapReport.CategoricalElements.IsFilterOrSortOn = true;
olapReport.FilterElements.Add(new Item { ElementValue = filterElement });
Vậy tôi muốn lọc thêm điều kiện Measure Internet Tax Amount > 500,000,000 thì code như thế nào, code có bị lặp lại lần nữa với Measure Internet Sales Amount không ?
Mong được giúp đỡ !

Ramesh Govindaraj [Syncfusion]
Replied On July 22, 2016 08:17 AM

Hi Heineken, 
Thank you for using Syncfusion products. 
We regret you to inform that more than one measure cannot be filtered at the same time. Please refer to the below screen-shot which shows the exception occurred in SQL server while executing the MDX query where two measures are used for filtering.  
Ramesh G.


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

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.