I have read a few other posts and have read through the guide on this function but I can't seem to get it to work. I simply want to have a measure in my cube be the average of the children for all subtotals in the cube.
IE at any subtotal you would be viewing an average. Is it easier to use the old methodology to take care of this? Just make a counter measure and write a C: level rule for the measure to be Measure/Count?
My current rule is exactly what you would see in the reference guid.
['Measure'] = C: ConsolidatedAvg(0, '', !Dim1, !Dim2, Etc);
ConsolidatedAvg Syntax and Usage
-
- Community Contributor
- Posts: 349
- Joined: Tue Aug 17, 2010 6:31 am
- OLAP Product: Planning Analytics
- Version: 2.0.5
- Excel Version: 2016
-
- Community Contributor
- Posts: 324
- Joined: Mon Jul 02, 2012 9:39 pm
- OLAP Product: TM1
- Version: PAL 2.0.8
- Excel Version: 2016
- Location: Sydney, Australia
Re: ConsolidatedAvg Syntax and Usage
Hi PD,
Also keep in mind dimension elements are sequence-sensitive
Can you please provide a screenshots where the error occurs
ET
Do you get N/A at consolidated level?but I can't seem to get it to work
Also keep in mind dimension elements are sequence-sensitive
Can you please provide a screenshots where the error occurs
ET
Last edited by EvgenyT on Fri Sep 27, 2013 3:33 am, edited 1 time in total.
-
- Community Contributor
- Posts: 349
- Joined: Tue Aug 17, 2010 6:31 am
- OLAP Product: Planning Analytics
- Version: 2.0.5
- Excel Version: 2016
Re: ConsolidatedAvg Syntax and Usage
Actually everything is coming back with a 1
-
- Community Contributor
- Posts: 324
- Joined: Mon Jul 02, 2012 9:39 pm
- OLAP Product: TM1
- Version: PAL 2.0.8
- Excel Version: 2016
- Location: Sydney, Australia
Re: ConsolidatedAvg Syntax and Usage
hm... so its working, but not with the result you are expecting, right?PlanningDev wrote:Actually everything is coming back with a 1
provide screenshots, else its bit hard to tell mate...
-
- Posts: 66
- Joined: Mon Feb 27, 2012 12:37 am
- OLAP Product: TM1
- Version: 10.2.2 Fix Pack 4
- Excel Version: 2010
Re: ConsolidatedAvg Syntax and Usage
I have used this in the past and within the rule I include the cube name and instead of a zero I used a 2 (See example below). Its bizarre the example uses a zero in the reference guide when directly above it under the flag value it explains what 1 and 2 include in the function?
ConsolidatedAvg(2
, 'HR - 01 - I - Hourly Rates'
, !HR - Plan Scenario
, !HR - Workflow
, !HR - 01 - I - Hourly Rates.Measures
)
;
flag-value
The flag value is the sum of the following values:
1 - do not use consolidation weighting when computing the value. If this is turned on the raw value of the consolidated element will be used.
2 - ignore zero values. If this is set, zero values will not be used as part of computing an average.
ConsolidatedAvg(2
, 'HR - 01 - I - Hourly Rates'
, !HR - Plan Scenario
, !HR - Workflow
, !HR - 01 - I - Hourly Rates.Measures
)
;
flag-value
The flag value is the sum of the following values:
1 - do not use consolidation weighting when computing the value. If this is turned on the raw value of the consolidated element will be used.
2 - ignore zero values. If this is set, zero values will not be used as part of computing an average.
-
- Community Contributor
- Posts: 349
- Joined: Tue Aug 17, 2010 6:31 am
- OLAP Product: Planning Analytics
- Version: 2.0.5
- Excel Version: 2016
Re: ConsolidatedAvg Syntax and Usage
My rule is exactly like yours but I just get all 1s instead of the average. My measures dimension is the last dimension in the cube.LanceTylor wrote:I have used this in the past and within the rule I include the cube name and instead of a zero I used a 2 (See example below). Its bizarre the example uses a zero in the reference guide when directly above it under the flag value it explains what 1 and 2 include in the function?
ConsolidatedAvg(2
, 'HR - 01 - I - Hourly Rates'
, !HR - Plan Scenario
, !HR - Workflow
, !HR - 01 - I - Hourly Rates.Measures
)
;
flag-value
The flag value is the sum of the following values:
1 - do not use consolidation weighting when computing the value. If this is turned on the raw value of the consolidated element will be used.
2 - ignore zero values. If this is set, zero values will not be used as part of computing an average.
My rule basically looks like
['Measure'] = C: ConsolidatedAvg(2, 'Cube Name', !Dim1, !Dim2, 'Measure');
Can this function create the average from its own leaf elements?