Finding Cumulative values in Query
Hi All,
I am developing one Query in which i have to show plant wise last 12 months status of audit.
In this audit i am able to show the types of audits say X,Y,Z perfectly.
But the thiing i want to calculate is the cumulative values of X,Y,Z before the last 12 months.
For Ex: Audit X Y Z Formula(X+Y-Z)
month1 10 20 30 0
month2 10 30 10 30
month12 20 40 20 40
month13 ***(X) ***(Y) ***(Z)..till
Like this i want to develop the report as per the requirement.
Please help how to resolve this issue.
Thanks in Advance.
Hi Sathya,
one simple solution is to have a result row at the bottom .
Select appropriate characteristic info object and do not suppress result for it in the query designer.
Please let me know for further clarifications
Regads
Venky
Similar Messages
-
SQL Query to find cumulative values for a Financial Year
Dear users,
My requirement is to create a SQL query for a table/view where I have day-wise data. I want to find out cumulative values for financial year by giving any date. It should add the values from start of financial year till that date in the financial year.
I think creating a view of such type will post heavy burden on resources since accuimulation will be done for each day upto that day.
ThanksDear users,
My requirement is to create a SQL query for a
table/view where I have day-wise data. I want to
find out cumulative values for financial year by
giving any date. It should add the values from start
of financial year till that date in the financial
year.
I think creating a view of such type will post heavy
burden on resources since accuimulation will be done
for each day upto that day.
ThanksKumar's solution will serve yours purpose but m not agreed
I think creating a view of such type will post heavy
burden on resources since accuimulation will be done
for each day upto that day. Khurram -
Subsequent use of cumulated value in query
Hi All,
We are using BEx Query Designer to create a query having one formula variable Stock on Hand as a cumulated value (along the columns).Now we need to use this cumulated value in another formula variable. Is this possible to do? If not could you please suggest an alternate for the same?
Stock on hand (for any given week) = (Total Receipts Total Demand) + Stock on Hand (for previous week).
Inv. Carrying Cost (for any given week) = Stock on hand (cumulated values as above) * Per unit inv. cost
Data for Total Receipts, Total Demand and Per unit Inv. Cost is present in the infocube at daily level. A sample report template has been given below:
Product Location Week W1 W2 W3
P1 L1 Total Demand 10 10 10
Total Receipts 20 0 5
Stock on Hand 10 0 -10
Per unit Inv. Cost 2 2 2
Inv. Carrying cost 20 0 -20
Points assigned in advance for your replies
Regards,
Bansi.Hi PV,
Thanks for the prompt reply. But we have already created two different formulae variables for the above requirement.
The formula variable for Stock on hand is displaying the desired cumulative values. But the formula for Inv. Carrying cost is not able to use the display-value (cumulative value) of Stock on hand and it just uses the value corresponding to that particular week. For eg.
for w2 if stock on hand =20 (cumulative value displayed on screen)
and the original value of stock on hand for w2 = 0
then the formula for Inv. carrying cost is using the original value(i.e. 0) but not the display value(i.e.20), whereas we want the cumulative value (i.e. 20) for our calculation.
Any help in this regard would be highly appreciated.
Regards,
Bansi. -
Issue in Query to find the Cumulative Values
Hi All,
I am developing one Query in which i have to show plant wise last 12 months status of audit.
In this audit i am able to show the types of audits say X,Y,Z perfectly.
But the thiing i want to calculate is the cumulative values of X,Y,Z before the last 12 months.
For Ex: Audit X Y Z Formula(X+Y-Z)
month1 10 20 30 0
month2 10 30 10 30
month12 20 40 20 40
month13 ***(X) ***(Y) ***(Z)..till
Like this i want to develop the report as per the requirement.
Please help how to resolve this issue.
Thanks in Advance.Hi All,
I am developing one Query in which i have to show plant wise last 12 months status of audit.
In this audit i am able to show the types of audits say X,Y,Z perfectly.
But the thiing i want to calculate is the cumulative values of X,Y,Z before the last 12 months.
For Ex: Audit X Y Z Formula(X+Y-Z)
month1 10 20 30 0
month2 10 30 10 30
month12 20 40 20 40
month13 ***(X) ***(Y) ***(Z)..till
Like this i want to develop the report as per the requirement.
Please help how to resolve this issue.
Thanks in Advance. -
Issue with Cumulative Value in BW Query
Hi
Here am trying to calculate a percentage over the two key figures which has the cumulative check in Calculation
but in result the percentage is appearing with non-cumulative values though am selecting the cumulative kf in formula.
find below the example :
C-OQTY --> Cumulative Ord Qty -- This is based on OQTY wherein the properties under Calculation i haved the Cumulated
C-TOQTY-->Cumulative Total Ord Qty --This is based on TOQTY wherein the properties under Calculation i haved the Cumulated
OQTY--> Order Qty
TOQTY--> Total Order Qty
C-OQTY/C-TOQTY *100
Calendar Day C-OQTY C-TOQTY OQTY TOQTY %
2008.02.01 115 115 115 115 100.00
2008.02.02 115 197 82
2008.02.04 158 381 43 184 23.37
2008.02.05 287 596 129 215 60.00
As you all can see that the % is showing the value as OQTY/TOQTY*100 Instead of C-OQTY/C-TOQTY *100
Need help
Thanks in Advance
Cheers
TaherThanks for your quick replay,
well am using "Use standard Aggregation" could you pls give me little more details abt before Before aggregation concept..
which option to choose in aggregaion..
Cheers
Taher -
Getting a percentage on cumulative values in Bex Query
We have a Bex Query where we have 4 columns. For the actual and projected attendence, I'm displaying cumulative values and a percentage. I want the percentage to be based on the cumulative values, but it's giving it to me based on the actual values (what's coming in, not what's being displayed). How do I get it to do the calculation on the displayed values?
This is the actual data coming through:
Month/yr____actl att___________ proj att
01/2005_____10________________10
02/2005_____10________________10
03/2005_____10 ________________20
What I'm getting now:
Month/yr_____cumulative actl att_____cumulative proj att_____percentage
01/2005_____10____________________20_________________50%
02/2005_____ 20 ___________________30________________100%
03/2005 _____30 ___________________50_________________50%
What I want is:
Month/yr_____cumulative actl att_____cumulative proj att_____percentage
01/2005_____ 10 _____________________20_______________50%
02/2005______20_____________________30_______________66.67%
03/2005______30_____________________50_______________60%Julie,
The OLAp processor in BI cannot take cumulated values - that is - once you cumulate your values - the cumulated values cannot be used further in BeX formulae - even if you use them the actual values will be used.
Month/yr____actl att___________ proj att
01/2005_____10________________10
02/2005_____10________________10
03/2005_____10 ________________20
What I'm getting now:
Month/yr_____cumulative actl att_____cumulative proj att_____percentage
01/2005_____10____________________20_________________50%
02/2005_____ 20 ___________________30________________100%
03/2005 _____30 ___________________50_________________50%
What I want is:
Month/yr_____cumulative actl att_____cumulative proj att_____percentage
01/2005_____ 10 _____________________20_______________50%
02/2005______20_____________________30_______________66.67%
03/2005______30_____________________50_______________60%
This would mean you will not get the desired output - the only way to do that is to use local macros / formulae in the workbook.
Arun
Hope it helps... -
Write the sql query to find largest value in row wise without using great
write the sql query to find largest value in row wise without using
greatest fuction?Another not so good way, considering you want greatest of 4 fields from a single record:
SQL> ed
Wrote file afiedt.buf
1 with t as (Select 100 col1,200 col2,300 col3,400 col4 from dual
2 union select 500,600,700,800 from dual
3 union select 900,1000,1100,1200 from dual
4 union select 1300,1400,1500,1600 from dual
5 union select 1700,1800,1900,2000 from dual
6 union select 2100,2200,2300,2400 from dual
7 union select 2800,2700,2600,2500 from dual
8 union select 2900,3000,3100,3200 from dual)
9 SELECT (CASE WHEN col1 > col2 THEN col1 ELSE col2 END) Max_value
10 FROM
11 (SELECT (CASE WHEN col1_col2 > col2_col3 THEN col1_col2 ELSE col2_col3 END) col1,
12 (CASE WHEN col2_col3 > col3_col4 THEN col2_col3 ELSE col3_col4 END) col2,
13 (CASE WHEN col3_col4 > col4_col1 THEN col3_col4 ELSE col4_col1 END) col3
14 FROM
15 (SELECT (CASE WHEN col1 > col2 THEN col1 ELSE col2 END) col1_col2,
16 (CASE WHEN col2 > col3 THEN col2 ELSE col3 END) col2_col3,
17 (CASE WHEN col3 > col4 THEN col3 ELSE col4 END) col3_col4,
18 (CASE WHEN col4 > col1 THEN col4 ELSE col1 END) col4_col1
19* FROM t))
SQL> /
MAX_VALUE
400
800
1200
1600
2000
2400
2800
3200
8 rows selected.
SQL> Edited by: AP on Sep 21, 2010 6:29 AM -
Non-Cumulative value Infoset will not work
Why doesn't an Infoset work with non-cumaltive values? Can I just use a multiprovider to get around this issue?
Hi,
Non cumulative values are not stored anywhere in the database. These are just definitions which are calculated at runtime. Consider the Stock cube. It has 2 key figures. Received stock and issued stock. It also has a Non cumulative Kf total stock which is defined as inflow : Received stock and outflow : issued stock.
At Query runtime, the total stock is calculated as inflow - outflow. No data is physically stored in your database.
Since an infoset joins values stored in a database, you will not be able to use it for Non cumulative values.
What you can do is find your Non cumulative KF definition, and map the input fields for this KF. You can then try and use these fields to calculate the value as a formula.
Hope this helps.
Regards. -
How to get formated value from query
i get value from query use the follow method
Object obj1 = dataAccess.getValue(i,j,DataMap.DATA_UNFORMATTED);
Object obj1 = dataAccess.getValue(i,j,DataMap.DATA_FORMATTED);
the first method retrun a value '1666.0',
the second method return a value null
but i want to get the value '1,666'.
who can tell me how can get the formated value?Ahu,
An implementation of DataAccess is not required to support all DataMap constants. For example, the OLAP-based Query object does not support DataMap.DATA_FORMATTED. To find out which DataMaps are supported for a particular implementation, you can call the DataDirector's getSupportedDataMap method.
If you have an Crosstab instance, there is a way to get the formatted cell value, based upon the formatting rules associated with the Crosstab. Get the GridViewFormatManager reference from the Crosstab, and call its formatDataValue method to return a String representation of the formatted data value.
Hope this helps,
djb -
Maintaining non-cumulative values in Mlti provider
Can we maintain non ucmulative values inteh multi ptovider Extras - > Maintain non cumulative values section.
I created few new cubes which has non cumulative keyfigures . In the cube I made 0CAL DAY as reference characteristic and selected Company code (0COMP_CODE) and Posting date in the document (0PSTNG_DATE) as characteristics of validity table for non-cumulatives.
Now I inlcude the new cubes and identified the non cumulative key figures in the multi provider.
Now here also do I need to make 0CAL DAY as reference characteristic and selected Company code (0COMP_CODE) and Posting date in the document (0PSTNG_DATE) as characteristics of validity table for non-cumulatives.I did not find an option in Extras - > Maintain non cumulative values in multi provider. CAn we maintain non cumulatives in MP ?Hello,
You dont need to maintain it at the MP level also.
Non-cumulative parameters are manitained only at the cube level.This was the case in 3.x so it should be the same in 7.0 also.
Regards
Ajeet -
HI All,
when I run a query of a non-cumulative infocube,there's always a "initial record" which actually doesn't exist in the fact table. Documents say "This entry does not remain physically in the table, but it is available for rebuilding the non-cumulative values". So where exactly is the initial value stored ?
Thanks
han.Hi,
What is teh DataSource and InfoCube?
If you are talking about 0IC_C03, please see the steps.
Treatment of historical full loads with Inventory cube
Setting up material movement/inventory with limit locking time
See about Non-Cumulatives
http://help.sap.com/saphelp_nw2004s/helpdata/en/8f/da1640dc88e769e10000000a155106/content.htm
Thanks
Reddy -
How to use cumulative Value in a formula
Hello Gurus,
I would like to use the cumulative value in a query as part of a formula calculation. I have created a KF which is assigned a constant value 1. When displaying the KF I am cumulating it so for each row I am getting 1,2,3,4...etc. How can I use this cumulated value in a formula calculation?
For example, in a column cumulative count is 1,2,3,4...etc .My requirement is ,i want to identify the record with number 36 , to do this i have created a formula with boolean Equal to function comparing with the required number, but the boolean result what am i getting is Zero instead of one(1).
The reason i found behind the problem is, the cumulative count that we see is dynamically happening during the run time for display ,but the internal value is 1 only.
Is there any other way to meet this requirement or am i missing anypoint?.
Thanks.Dear Yaseen,
To get the value in formula cumulative,after you have created the formula for that particular key figure,go to edit and click on tab "calculations".
In that select overall result as 'count all values not equal to zero' and single result as 'count all values not equal to zero' .
And mark the cumulative check box underneath.
I hope you get the desired result and please do me favour .
Sumit goomber -
Dump when trying to display characteristic values in QUERY DESIGNER
Hi Experts,
Life seems to become a struggle with 7.0 for me :-(.
My current problem:
If I try to display characteristic values in Query Designer (left section of screnn, wthin dimensions) system dumps frequently.
It's that kind of dump, that doen't help really (to my oponion)_
What happened?
The exception 'CX_RSR_X_MESSAGE' was raised, but it was not caught anywhere
along
the call hierarchy.
Since exceptions represent error situations and this error was not
adequately responded to, the running ABAP program
'CL_RSBOLAP_BICS_SERVICES======CP' has to be
terminated.
How to correct the error
If the error occures in a non-modified SAP program, you may be able to
find an interim solution in an SAP Note.
If you have access to SAP Notes, carry out a search with the following
keywords:
"UNCAUGHT_EXCEPTION" "CX_RSR_X_MESSAGE"
"CL_RSBOLAP_BICS_SERVICES======CP" or "CL_RSBOLAP_BICS_SERVICES======CM003"
"HANDLE_UNCAUGHT_EXCEPTION"
... etc.
BW 79, SP21
GUI 7100.4.14.3136
Any ideas?
Thanks in Advance and Regards
JoeHi Vikram,
Thanks for reply. Reinstalling GUI was successful, but - error still occurs. ..
Regards
Joe
Edited by: J.F.B. on May 28, 2010 3:02 PM -
Hi:
I have given the Aggregation as SUM and the Excepiton Aggregation as Last Value for a non-cumulative KF Quantity Total Stock for Inventory. I am using Non-cumulative value with in- Receipt Quantity Total Stock and out-flow Issue Quantity Total Stock. Then I can calculate Quantity Total Stock in Query.
But I have another requirement, I want to a KF to count 0Material whose Quantity Total Stock not equal 0. In fact, for a Non-cumulative value, the Aggregation reference char of KF Quantity Total Stock is 0calday, but what I want is 0Material. How could I create such KF?
Many thanks in Advance!
Points will be assigned!Hi,
The basic purpose of Non-cumulatives is to get the values for them depending upon the Time Characterestics alone and not on any other characterestics. As far as I know you cant use 0MATERIAL as the aggregation reference Char. -
How to load init for non cumulative values?
Hi folks,
anyone here, who can tell me how to load initial amounts from DSO to non cumulative values in InfoCubes?
I found only poor documentation about this.
Thanks!hi Timo
you load initial of load as you do in the normal case only thing you have to keep in mind that before loading opening balance you have to UNCLICK NO MARKER UPDATE from the infocube and compress the request ASAP as it will greatly effect your query performance.
sanjeev
Maybe you are looking for
-
hi i have a scenario where i get the free of cost material form customer i add the conversion,the scarp generated m if i use the scrap generated as credit the cost estimate is negative but i should bcz this is a sfg and it fits into aonther FG and th
-
Disappearing Report a Problem button iTunes 10.6
OS 10.6.8 iTunes 10.6 I am an iTunes match user and I have a song that I purchased a year or so ago that will not stream or download. The song it by the Ting Tings "That's Not My Name" Anyway, I try to report the problem from my account purchase hist
-
Very poor sound from internal speakers, very good on headphones.
Hi, I hope you can give some advice. New to all this so apologies if protocols are broken etc New 20" imac, running Leopard. very thin, tinny sound from internal speakers (similar to hearing someone's else's walkman on the train). when I plug headpho
-
Save contant of dropdownlist in 2d array
HI Community, Is it possible to save the contant of an dropdown in 2d array? greets Chris
-
Hi, I'd be grateful if someone could point me at a kind of "...For Dummies" intro to SCCM 2012 (preferably in video form). We're investigating whether SC as a whole could replace our current asset management tool and add a few extras (like VMM for ex