显示标签为“grouping”的博文。显示所有博文
显示标签为“grouping”的博文。显示所有博文

2012年3月20日星期二

Discretization method question

Hi,

I wonder what type of expression I could use in the Discretization method property of a dimension attribute to achieve a custom grouping.

As an example, I have a margin % measure that I would also have available as a discretized dimension.

I guess first step would be to create a calculated member where the parent hierarchy would be dimension, then use discretization to specify something like

less than 0%
between 0% and 15%
greater than 15% and lower or equal 30%
greater than 30%

Any example out there?

Thanks,

Philippe

This article should explain it:

http://msdn2.microsoft.com/en-us/library/ms174810.aspx

Edward.
--
This posting is provided "AS IS" with no warranties, and confers no rights.

2012年2月17日星期五

Disable grouping

I would like to be able to disable grouping depending on the value of parameter. At the moment I have the following expression for grouping:
=IIf(Parameters!Group2.Value.equals(""), false, Fields(Parameters!Group2.Value).Value)

What I am trying to do is if the value of the Group2 parameter = "" turn off grouping. Group2 is assigned a value from the following custom code:

Function Group2Value() As String
Dim Group As String
Group = ""
Select Case Report.Parameters!ReportType.Value
Case "1"

Group = ""

Case "2"

Group = "CategoryID"

Case "3"

Group = "StockFamilyID"

Case "4"

Group = "GroupID"

Case "5"

Group = ""

Case "6"

Group = "SaleableGLCodeID"

End Select
Return Group
End Function

However this is not working.

Can grouping be disabled and if so what am I doing wrong?

Thanks in advance.
can't you just set grouping to =1 ?

this technique can also be used in a matrix when you need an extra grouping for e.g. to display count AND amount but don't physically want to group the data|||

Yes, Grouping can be disabled.

Try doing the entire calculation in the custom code and place the name of the function in the expression for Grouping.

The Grouping expression as =Code.Group2Value()

Now based on whatever value is returned from the function Group2Value, the grouping will be done accordingly.

Regards,

Pradeep