How to specify what is the default member value, if we set the dimension isAllMembersEnabled=false.
sample data for the dimension are [A,B,C,D,E] and when I select the dimension I want the default value will be C.
You can specify it in the mdx context:
<mdxContext>
<defaultMembers>
<defaultMember dimensionName="name of your dimension">
<defaultValue>[name of the level of C].[C]</defaultValue>
</defaultMember>
</defaultMembers>
</mdxContext>
Related
I have 3 fields
Pick_no= fields.many2one(stock.picking)
Partner_id= field.char
Location_id=field.char
I want to auto fill partner and location fields based on the selected pick_id.
What should I use onchange or depends?
IMO You may use onchange() method.
Need to change field datatype. Go to stock.picking model and verify datatype. In your case, you declared with char. It is not wrong but not advisable. If you want to keep char then assign char value, not ID.
partner_id = fields.Many2one(res.partner)
location_id = fields.Many2one(stock.location)
Are they constraints?
Are they part of standard UML, or are they customized by startUML or EA?
How many of them are there? Where can I find a detailed description of each {xxx} in UML2.5 Specificationformal?
Thank you for your answers!
{xxx, yyy, ...} are properties you can put on attribute/relations/..., readOnly
There are predefined list of properties attached to some elements.
readOnly is one of the properties of Properties, § 9.5.4 from page 113 of formal 2017 2.5.1 :
‘readOnly’ means that the Property is read only.
‘union’ means that the Property is a derived union of its subsets.
‘subsets’ means that the Property is a proper subset of the Property identified by
, where may be qualified.
‘redefines’ means that the Property redefines an inherited Property identified by
, where may be qualified.
‘ordered’ means that the Property is ordered, i.e., isOrdered = true.
‘unordered’ means that the Property is not ordered, i.e., isOrdered = false.
‘unique’ means that there are no duplicates in a multi-valued Property, i.e., isUnique = true.
‘nonunique’ means that there may be duplicates in a multi-valued Property, i.e., isUnique = false.
‘seq’ or ‘sequence’ means that the property represents an ordered bag, i.e., isUnique = false and
isOrdered = true
‘id’ means that the Property is part of the identifier for the class.
query is one of the predefined property of Operation Template Parameters, of formal 2017 2.5.1 §9.6.4 page 118 :
‘redefines’ means that the Operation redefines an inherited Operation identified by ,
where may be qualified.
‘query’ means that the Operation does not change the state of the system.
‘ordered’ applies when there is a multi-valued return Parameter and means that its values are ordered.
‘unordered’ applies when there is a multi-valued return Parameter and means that its values are not
ordered.
‘unique’ applies when there is a multi-valued return Parameter and means that its values have no
duplicates.
‘nonunique’ applies when there is a multi-valued return Parameter and means that its values may have
duplicates.
‘seq’ or ‘sequence’ applies when there is a multi-valued return Parameter and means that its values
constitute an ordered bag, i.e., isUnique = false and isOrdered = true.
I'm trying to create a calculated member measure for a subset of a group of locations. All other members should be null. I can limit the scope but then in the client (excel in this case) the measure does not present the grand total ([Group].[Group].[All]).
CREATE MEMBER CURRENTCUBE.[Measures].[Calculated Measure]
AS (
Null
),
FORMAT_STRING = "$#,##0.00;-$#,##0.00",
NON_EMPTY_BEHAVIOR = { [Measures].[Places] }
,VISIBLE = 1 , ASSOCIATED_MEASURE_GROUP = 'Locations';
-----------------------------------------------------------------------------------------
SCOPE ({([Group].[Group].&[location 1]),
([Group].[Group].&[location 2]),
([Group].[Group].&[location 3]),
([Group].[Group].&[location 4]),
([Group].[Group].&[location 5])
}, [Measures].[Calculated Measure]);
// Location Calculations
THIS = (
[Measures].[Adjusted Dollars] - [Measures].[Adjusted Dollars by Component] + [Measures].[Adjusted OS Dollars]
);
END SCOPE;
It's as though the [Group].[Group].[All] member is outside of the scope so it won't aggregate the rest of the members. Any help would be appreciated.
Your calculation is applied after all calculations already happened. You can get around this by adding Root([Time]) to the scope, assuming your time dimension is named [Time]. And if you want to aggregate across more dimensions, you would have to add them all to the SCOPE.
In most cases when you have a calculation that you want too do before aggregation it is more easy to define the calculation e. g. in the DSV, e. g. with an expression like
CASE WHEN group_location in(1, 2, 3, 4) THEN
Adjusted_dollars - adjusted_dollars_by_comp + adjusted_os_dollars
ELSE NULL
END
and just make a standard aggregatable measure from it.
I've searched high and low for this answer. After reading the above suggestion, I came up with this:
Calculate the measure in a column in the source view table
(isnull(a,0) - isnull(b,0)) + isnull(c,0) = x
Add the unfiltered calculated column (x) to the dsv
Create a named calculation in the dsv that uses a case statement to filter the original calc measure CASE WHEN location IN ( 1,2,3)THEN xELSE NULLEND
Add the named calculation as measure
I choose to do it this way to capture the measure unfiltered first then, if another filter needs to be added or one needs to be taken off, I can do so without messing with the views again. I just add the new member to filter by to my named calculation case statement. I tried to insert the calculation directly into a named calculation in the dsv that filtered it as well but the calculation produced the incorrect results.
I have a SCOPE statement in my cube that prevents aggregation of certain measures in incompatible dimension members are used:
SCOPE (MeasureGroupMeasures('Measure Group'), [User Type].[User Type].[All]);
this = IIF(DISTINCTCOUNT(NONEMPTY(EXISTING([User Type].[User Type].[All].Children)
,[Measures].[Measure Group Count])) > 1
, NULL
, [Measures].CurrentMember);
Basically if we are trying to aggregate data from the measure group for more than one "User Type", a null value is returned.
While this approach works fine, the performance leaves a lot to be desired.
Is there any way to achieve this that is much faster?
Thanks
Add a Measure Group using the same Data Source as your User Type dimension. The only Measure should be a count e.g User Type Count, not visible. The only Dimension Relationship should be to the User Type dimension.
Now you can just say:
IIF ( [Measures].[User Type Count] > 1 , ...
Using infragistics UltraNumericEditor, if I set the .MaxValue to 50, the control will allow me to enter decimals larger than the limit (for example, 50.99)
I see the same behavior if I set the .MaxValue property to 50.01 (can set values larger)
I can obviously resolve this in code but resetting the value, but it seems like the control should do this on its own.
Is there something I'm missing in how to use these properties correctly?
I suppose you are using the UltraNumericEditor with the property Style set to Decimal (or Double).
In this case the control allows you to insert digits that render the input invalid with respect to the property MaxValue. However, by default, you are not able to exit the control until the value is correct.
If you want, you can use the event ValidationError that gives your the ValidationErrorEventArgs parameter. This parameter contains the LastValidValue property to reset the wrong value, the RetainFocus to let your user exit from the editor (or, if you prefer, display an error message)
private void ultraNumericEditor1_ValidationError(object sender, ValidationErrorEventArgs e)
{
// Reset the content to the last valid value and allow the exit from the editor
ultraNumericEditor1.Value = e.LastValidValue;
e.RetainFocus = false;
// In alternative display a message, but leave the wrong value to be reedited
// DisplayValidationMessage("The max value allowed is 50.00");
}
The problem was a result of the IEditorDataFilter for percentage values.
Infragistics recommends, and I had implemented, an IEditorDataFilter which converts decimal percentages (.5 = 50%) into percentages for display.
This filter is applied before the validation for the control takes place. Therefore, setting the MaxValue to "50" allowed me to enter "50.99" but not "51"... normally this would have caused a validation error as per Steve's answer. However, because of the IEditorDataFilter applied to this control, the value was automatically converted to .5099 and this new value does not violate the constraint.
The solution I implemented was to check the value in the Validated event to see if it was larger than the MaxValue / 100, and if so to set it equal to the same.