Average of characteristic
Hello experts,
I want an average-aggregation of a key figure to be calculated and displayed in Bex not only according one dimension (like 0CALDAY), as chosen in the InfoObject's declaration, but also according other dimensions like product or region etc.!
any suggestions?
Axel
Hello Anu,
I am a little bit confised.
CKF = characteristics figure?
what do you mean by enhane" tab? there is a "aggregation"-tab where I gave exception aggregation as " Average" and reference characteristic as 0CALDAY.
If I choose product as reference characteristic for the exception aggregation I only get the average along product dimension!
so I have the same problem with the product dimension, right??
Axel
Similar Messages
-
Multi Characteristic average aggregation in BEX
Hello,
I have a query with one formula that should consider always 3 characteristics for the calculation.
Example
P1 M1 I1 Formula
P1 M2 I2 Formula
is working for all types of drill because I set Formula aggregation Average by P
P1 M1 I1 Formula
P1 M1 I2 Formula
is not working if I remove I or M dimensions from the query
P1 M1 I1 Formula
P2 M1 I1 Formula
is not working if I remove P dimension
Basically I would like that the formula result is always calculated as the P, M, I dimension by this order were there all the time.
I also try to fix the 3 dimension in the layout but without success.
Can you help me out? ThanksHi,
Read this:
Why Calculated Key figure instead of New Formula?
Reference: help.sap.com
The replacement of formula variables with the processing type Replacement Path acts differently in calculated key figures and formulas:
If you use a formula variable with u201CReplacement from the Value of an Attributeu201D in a calculated key figure, then the system automatically adds the drilldown according to the reference characteristic for the attribute. The system then evaluates the variables for each characteristic value for the reference characteristic. Afterwards, the calculated key figure is calculated and, subsequently, all of the other operations are executed, meaning all additional, calculated key figures, aggregations, and formulas. The system only calculates the operators, which are assembled in the calculated key figure itself, before the aggregation using the reference characteristic.
If you use a formula variable with Replacement from the Value of an Attribute in a formula element, then the variable is only calculated if the reference characteristic is uniquely specified in the respective row, column, or in the filter.
Once again give a try we made formula variable in formula instead of that make use of CKF.
It may work.
Regards,
AL -
Urgent!!Average calculation based on a characteristic!
Hi guys
I have an average calculation based on a characteritic ..
Example:
This is a SRM Mgmt.It has an Organisation purchasing org,source purchase,PR,etc..
Report is a Survey rpt.
Average Score across Customer responded for each question for the particular PR...
Where weightage is applied for each question & based on which
total weightage of all Qns for a PR
Avg.Score= -
No of Questions.
How do u calculate using the exception aggregation??????????Pls revert ASAP.
thnx
BI LearnerSolving Myself
-
Query Scenario Help - Average of Multiple Regions
Hi, I have a query scenario I can't create and I hope someone can help with.
The user inputs a sales Area and the report is to output the regions in that area and provide the Volume (easy) and the Average of all the presented regions. The problem is that the number of regions is dynamic so I don't know how to go about determining the average and making it constant across the regions. The user can also drill down on a region to present divisions and I would then need the average for the divisions this time instead of regions. Can you help?
Example 1
Input Sales Area 1000000
Region 1000001 1000002 1000003
Product1 Volume 100 120 105
Product1 Average 108 108 108
Product2 Volume 200 400 325
Product2 Average 308 308 308
Example 2
Input Sales Area 2000000
Region 2000001 2000002 2000003 2000004
Product1 Volume 100 120 105 180
Product1 Average 126 126 126 126
Product2 Volume 200 400 325 600
Product2 Average 381 381 381 381
To get this layout I have the following in the query builder:
The 2 Products are in a structue under Rows
The Key figures structure is also under Rows
The Region is under the columnsIf you redesign the report slightly to move the "Average" to a column at the end of each row (which really makes more sense, IMHO), then the answer is easy. Just change the Suppress Results Row property to "Never" for Region, and change the Display Results As property to "Average" for Volume.
You could also make this same change to Division and/or any other free characteristic they might use as a drill-across in the report.
Hope this helps...
Bob -
Averages in a query using a variable with Replacement Path: Replacement wit
I have two queries. Query1 has a handful of characteristics, one of which is used in a formula where I used replacement path in order to be able to use it in some calculated key figures. I also have a couple of key figures that are not calculated and they are averages.
The second query has a characteristic value variable that is replaced with the first query. This replacement value variable is placed into the filter section and the characteristic itself is placed in the rows section. I am bringing in the same calculated key figures that were in my first query as well as the normal key figures that are averages.
The issue I am having is the regular key figures that I am bringing in are coming in summed up instead of as averages. Is it possible to bring the normal key figures in Query1 as averages into Query2?
There is more information in the thread below if you need more background.
[Replacement Path and Aggregation;
PS - I am using 7.0.Hi Satyakam,
In the text variable properties make sure that in the replacment path you have chosen "Text" to appear date as per user setting . Other wise as in your case it must be set to "Key" which always shows in the format YYYYMMDD.
Hope that helps.
Regards
Mr Kapadia -
How to calculate Average of Keyfigure
Hi Gurus,
I have a requirement where I have to calculate average of key figure value for 1 material.
I tried using 'Average' in exception Aggregation but it just sums up everything.
Can anyone please explain?
ThanksHi
1. Include the key figure you want to average into the columns; call it KF1
2. Create a Formula; call it CTR1, and in the detail view put a 1. (This 1-value is not used except to avoid an error in the formula syntax checker.) On the Aggregation tab, choose Exception Aggregation: Counter for all Detailed Values, and for the Ref. Characteristic, choose the same characteristic as the lowest level characteristic in the initial view of the output. E.g. if you only have 0CALMONTH in the output, choose 0CALMONTH. When you run this, the total at the bottom of this column should be equal to the number of rows in that column. Note that we use Exception Aggregation here so that the total at the bottom is calculated before the output is generated and is available to other formulas in the query design; if we were to use the Calculation tab it would look the same to us in that the total would appear at the bottom, but the calculation would occur too late for us to use within the query.
3. Create a second formula, call it AVG1. The formula will be:
SUMGT KF1 / SUMGT CTR1
SUMGT accesses the Overall Result value at the bottom of the KF1 and CTR1 columns. You can find the SUMGT function in the Data Functions folder - turn on technical names first; the description is Overall Result. You could instead use SUMRT; the difference is that SUMGT will use the filters applied in the filter block; SUMRT will ignore them.
3. Run the query. You should see the Average in every cell in the Average column. You can use this formula as input to another formula, or just use ( SUMGT KF1 / SUMGT CTR1 ) within a formula to access the average value.
Thanks -
Hi Experts,
I have faced a question that, in a query we have sales Value and 0Calday. But we need to calculate the Avg Sales Value Per day where as there will be thousands of records that will be updated daily.. I mean to sat that total sales value will be dynamic, then how will we calc the avg sales value per day? Please help me out...
Advance Thanks & Regards,
ChintuChintu,
Use exception aggregation.
1) Go to the query designer and create a calculated key figure at the cube level with only one object in it - sales value. Give it a technical name and save.
2) In properties of this calculated key figure, at the bottom, select aveage of all values and select 0CALDAY as the exception reference characteristic.
Use this key figure in your queries now. Whatever the drill down, this key figure will give the average. So if the drill down is by day, you will get the avg. of the day, if it is month, then avg. of the month, etc. etc.
Aneesh -
Weighted average calculation in query
Hello
i'm having some issues calculating an weighted average...
imagine the next scenario
LINE | FORMAT | TIME | WORKERS
10 | 000123 | 10 | 5
10 | 000123 | 350 | 2
10 | 000123 | 75 | 1
From this i need the wighted average of the nr workers considering the time they were working
so, to calculate that i have to do for example:
(time * worker)/total time
in numbers...
((105)+(3502)(75*1))/(10350+75)
=1,89 workers for that line, for that format and for all that time
I am able to do that formula inside bex analyser, however when the user drills down the report or sorts the key figures in other order the result is not correct.
any suggestions?
Best regardsHi Ricardo
What we did, in a similar case, we used two formulas. The first one was the calculation (time * worker) with exception aggregation (summation).
The second formula was the previous formula divided to time.
The trick is which characteristic to use for the aggregation in the first formula, i think you should have the most detailed one.
Then i believe the two formulas will calculate correctly the weighted average based on any selections/analysis that you do.
Regards
Yiannis -
Hi
In my query I am unable to average the values in the query is there a way of getting number of records in the query please tell me how to get average values in the query level i went to properties i found the average option but that does not work.
Regards,
Nikhil.Hi Nikhil,
Try with the solution detailed in the following document:
www.service.sap.com/bi --> Product Information Previous Releases --> Media Library --> HOW TO... Guides --> Guide List SAP BW 2.x --> How to... Count the occurrences of a characteristic.
Ciao.
Riccardo. -
Weighted average total displaying as average
Dear BI Guru's,
one of my report Weighted average total value displaying incorrect values, for example
Clinker Value Clinker Rate
(Rs in lacs) (Rs/MT)
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
342.00
1.21
342.00
0.72
342.00
0.80
342.00
2.73
19.59
Clinker Rate MT should display 342 instead of 19.59, i was applied exception aggregation for clinker value Total and ref characteristic plant. same exception aggregation applied to net quantity keyfigure.
Clinker rate calculation = Clinker value/Net quantity,
thanks in advance who replay as earliest.
regards
Ramesh GWhat is the line item infoobject in your data which is causing given list of records?
Try TOTAL with line item infoobject as ref char but not plant.
Try with constant selection on your KF to display 342. -
Calculate Four Week Average SellThru In RPD
Hello All,
We have a requirement to calculate the four week average sellthru dynamically in OBIEE. Basically we need to expose SellThru Average as a column in presentation layer. The calculation of this column should use the below logic. Also see below for data model details too.
1. The SellThru Average is dependent on another metric called SellThru
2. The data in fact table is at a grain of Item and Customer. These two are confirmed dimensions.
3. Rules to calculate the SellThru Average
a. If the customer is looking at the Week10 data at item level, the average should be calculated using Week5, Week6, Week7 and Week8 SellThru.
b. If the SellThru is available for all the above weeks, then the formula for average will be (Week5 SellThru+Week6 SellThru+Week7 SellThru+Week8 SellThru)/4
c. If the SellThru is not available for Week5, then we need to go back and see if SellThru data is available with in last 26 weeks for that Item. If yes then the denominator will be 4 and numerator stays the same
d. If the SellThru is not available with in last 26 weeks, and only available for Week6, Week7, Week8 then the formula would be (Week6 SellThru+Week7 SellThru+Week8 SellThru)/3
e. If the SellThru is not available with in last 26 weeks, and only available for Week7, Week8 then the formula would be (Week7 SellThru+Week8 SellThru)/2
f. If the SellThru is not available with in last 26 weeks, and only available for Week8 then the formula would be (Week8 SellThru)
g. If the SellThru is not available with in last 26 weeks, and only available for Week5 then the formula would be (Week5 SellThru+Week6 SellThru+Week7 SellThru+Week8 SellThru)/4.
In all the above cases, for whichever week the SellThru is not available, substitute with 0
These rules needs to be applied at all the higher levels for both Item and Customer dimensions. For example, if the user is looking at Segment level which is the next level to item in Product hierarchy we need to check if the SellThru is available for any of the item under that segment for the respective weeks and apply one of the above formula accordingly.
We were able to achieve this using OBIEE logical columns and repository variable for Current Week alone. But we are stuck at calculating the averages for previous weeks. Meaning, if the user is viewing the data for Previous week, we need to go back from that week. It's basically dynamic in nature. User can also look at two or more weeks data at the same time and the average needs to be displayed as per that.
I hope i have explained the requirement OK. Any help in this will be well appreciated. Thanks in advance.
SivaHi Thomas,
Create a selection in which you will key figure KF3 and a calweek with restriction with fromcalweek and to calweek variables.
The tocalweek is a formula variable which is derived from replacement path of characteristic calweek.
and fromcalweek is offset of tocalweek variable - 6.
So for each week it put toweek as that weekno and fromweek as weekno - 6 and brings the KF3 value in that range.
Regards
vamsi -
Change Column Value based on Characteristic in Rows
I am not sure it is possible.
We have product prices at different levels of customer hierarchy.
Channel > Division > Region > Market
One Region can have multiple Markets. Each market can have different Rates. But the Region will have a different Rate which many not be the average rate of all market (assigned as part of master data)
I have a column for Product Price. So when a Report is run at Market Level it should use Market Rate. If Market is Removed and Region is dragged into the report it should use Region Rate for Product Price.
Product Price is Restricted by Rate Type value to determine which Rate is used.
Is there a way to dynamically determine the define the column value based on the characteristic value in the ROWS.
ThanksHi,
For every CHAR like Market/Region there will be some key. For example Maket1 = 11 and Market2 = 22. If that key is a number then you may create replacement path variable on that and convert the same in numbers then you may create various CKF (for various rate type) and put "If" condtion and check for those replacement path CKF and use the apprpriate one.
You need to write some tricky formula at CKF levels. This is one of the way to achieve that.
I hope it will help.
Thanks,
S -
Error in Dimension formula to find the average price
Hi all,
I have tried a dimension formula to find the average price of Product.
if the product is a parent level member then average price should be the average of the list price,other wise it should be the list price itself.
IIF([PRODUCT].CURRENTMEMBER.PROPERTIES("CALC")="N",[KEYFIGURES].[LISTPRICE],AVG(DESCENDANTS([PRODUCT].CURRENTMEMBER,[KEYFIGURES].[LISTPRICE],LEAVES)))
While i tried the same i received some strange error , i don know whether its having some dependency on the Customer dimension. since K0030101 is a memebr belonging to CUSTOMER dimension.
MDX statement error:"Value K0030101 for characteristic /CPMB/U6D7SXT un"
I'm not sure whether its an error with the formula i created or any dependancy issue or whether this scenario is possible using dimension formulas or not.
Thanks in advance .
Anila MohanHi everyone!
We are using BPC 7.5 NW SP08 and we've had the same error message while adding a formula to the Account dimension:
'MDX statement error: "Value 1 for characteristic /CPMB/S9D7Q23 un".
We then checked in BW for /CPMB/S9D7Q23 and found out that it was the Product dimension.
The solution for the issue was quite interesting. I had seen in another post that sometimes CALC property was not correctly determined for SP08. The solution proposed was to edit dimension members, clear ParentH1 column, process dimension, re-edit, paste back ParentH1 values and process dimension again. This corrected CALC property problem.
It also worked for my case. After doing it to Product dimension I tried again to set the formula in Account dimension and it worked!!
Hope this helps.
Regards,
Luigi Laporte -
SEM BCS - Add characteristic in breakdown category
Hi Gurus,
In the breakdown category, there are many characteristics which is defined. For Example : Trading Partner, Transaction Currency.
The Question is :
How to add new characteristic in the breakdown category?
Thanks In advance.Thanks, just came back from my vacation on the seashore . ;=)))
Yes, through RSA1 you maintain your totals cube including there the char needed. Include into dimension (like "other subassignments") and activate.
In UCWB, in the data model, drag and drop this new char into the left part of the screen (mappings). Assign the role subassignment, generate the data basis and cons areas.
Your "weighted Average Interest rate" looks like a key figure for me. Is it so? If yes, you cannot use more than 4 predefined KFs in the totals cube. If this is a char, then it's not very clear what kind of values it keeps (and its role is not clear either).
No, you cannot copy from "transaction currency". Currencies are special chars. Your "weighted Average Interest rate" doesn't look like having currencies property. Just create another infoobject and use it.
Another special chars like FYV or posting period, or movement type etc are special chars too. The chars that are to be created as usual infoobjects, are mapped with 'Subassignment' role, the special ones - with predefined roles. It's the difference between them.
Hope this helps. -
Calculate total and average for same key figure
Hi Experts,
I have a requirement where I need to calculate total and average for same key figure no of employees.
eg:
If I enter 03,2009 as Input the reuslt should give from financiual year starting to current month.
11.2008 12.2008 1.2009 2.2009 3.2009 average
11 10 12 10 10 10.6
10 10 11 12 10 10.6
total 21 20 23 22 20 21.2
we have only one characteristic in rows... companycode.
Waiting for your Inputs.
Regards
Prasad Nannurino it will work for u
you have to use variable on 0calmonth or fiscal period depending on what Time characteristic u are using.
lets say that variable is zcalmonth
it is based on 0calmonth for e.g.
now u restrict keyfigure with this variable zcalmonth with time char. = 0CALMONTH
copy and paste the restricted keyfigure
now set offset for variable in variable selection screen dialog box = -1
repeat this until u want
make this variable mandatory
now at query execution user will select any value for month/year
and u will see all 5 months in result set
now there can be maximum 12 months in a year, so u end up creating only 12 restricted keyfigures.
use YEAR in restricted keyfigure too, and restrict it with YEAR VARIABLE processing by CUSTOMER EXIT = CURRENT YEAR
in this case it will automatically removes any additional values...
for e.e.g
YEAR = 2008 only
User entered 6/2008
so lets say ur financial year starts in april 2007 and ends in april 2008
so u expect to see
4/08
5/08
6/08
but u created 12 restricted keyfigures , so it will show upto
4,5,6 months only
Maybe you are looking for
-
How to turn on Home shearing on Apple TV without remote? I lost my remote and to be able to use the app (remote) I need home shearing on.
-
Ipod shuffle will not sync songs Error -50
Hello i recently got a new ipod shuffle last week and now it wont sync with my songs. it only syncs one song out of the album. im using windows Xp HELP?!?!?!
-
Cannot start weblogic 8.1 User is not permitted to boot the server
Hi, Sorry to cross-post, but I didn't seem to get any feedback on this in the 'security' newsgroup. I have installed Weblogic 8.1SP3 on two identical workstations as well as deployed our application. On one server WL8.1 starts up fine. On another, it
-
Show Custom Attributes of GP Tasks in the Universal Worklist
Hello, I have created a GP Process and i can see and execute its task in the universal worklist. But it only shows standart propertys like : Process,From, Sent, Due, Status. I want to add Custom specific task propertys, but i couldn`t find the way. R
-
How To Check File A records in File B
Hi All, There are two Tables A and B A has only one column(consist of 100 records) and B Has 70 coloumns. I want to check all records of A(1 to 100 records) into B columns (1 to 50 columns) and also count how many records are present in first record