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.
Similar Messages
-
How to use a cumulative value in a formula
hi, experts
I have a question about how to use a cumulative value in a formula. Below is the example:
wk1 wk2 wk3 wk4 wk5....wk n
sales order 5 10 15 10 5
build plan 8 8 10 15 10
result 3 1 -4 1 6
result row is what I want to get, the formula is:
wk1 result = wk1 build plan - wk1 sales order
wk2 result = wk1 build plan + wk2 build plan - (wk1 sales order + wk2 sales order)
wk3 result = wk1 build plan + wk2 build plan + wk3 build plan - (wk1 sales order + wk2 sales order + wk3 sales order)
I've already ticked the cumulative in properity of the key figures. It seems like that the cumulative results only can display, but can't be used in formula. Could you please help me? Many many thanks !!Hi
In properties of that formula, there is option called 'formula collision' there you select 'formula from compiting result'. I think this will solve the problem. -
When do we use Non-Cumulative values?
Hi BW Experots?
When do we use Non-Cumulative values?How is it related with exception aggregation
Please tell me .
Thanks in anticipation.Hi,
Taken from std, doc....
A non-cumulative is a non-aggregating key figure on the level of one or more objects that is always displayed in relation to time. Examples of non-cumulatives include headcount, account balance and material inventory.
http://help.sap.com/saphelp_nw04/helpdata/en/8f/da1640dc88e769e10000000a155106/frameset.htm
Check this out...
http://help.sap.com/saphelp_nw04/helpdata/en/80/1a62dee07211d2acb80000e829fbfe/frameset.htm
Pls. assign points if this helps you.. ****
Thanks,
Raj -
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 -
URGENT - Using a session value for query in reports
Please Reports Team or anyone....
I need to make a pdf report on the web.
The query needs to be dynamically so i can make reports on the fly in a secure manner, for example with the use of a session variable as the identifier (eg. select * from emp where id=<session>).
I know that rwservlet can be used but the id must not be displayed - so i figured to make a servlet or use a JDBC-PDS, but i cant find any coding examples anywhere.
Whats the framework ? how do i do this - i've tried an example using a new Java URLconnection and connect to the rwservlet then i'll hide the url, but how can you then stop people from using the rwservlet...
I've been working on this for a long,long,long,long time - could anybody please help !!!!!Dunno if this wil help you, but here's what we do...
We use multiple web servers and we put our application servlets on a different box to the report server's servlet.
Users cannot access the report server directly. They must request reports from our application servlets which build the appropriate http requests and forward these onto the report server (using URLConnection). We stream the result back through our servlet so the user is completely unaware that the reports are generated on a separate box.
If you don't have the luxury of multiple servers, you may be able to configure your webserver to only accept requests to the report server's servlet from the local machines IP address? -
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 -
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. -
Dear Experts,
I extracted data with the standard datasource 0CO_OM_OPA_1. Cost from this datasource is costs by month. However, I need to have another key figure for cumulative cost.
1) How can I get cumulative values through the transformation? (I need to display data on Xcelsius, and I am not sure this cumulative value can be achieved in the report)
2) I heard that we can calculate the cumulative value by Non Cumulative Key Figure. However, I don't know how it works. I try to create Non Cumulative Key Figure based on 0AMOUNT from the datasource, but it requires me to add 0CALDAY into my infocube. (The finest level in time dimension in my infocube is 0CALMONTH) Is it true that I can use Non Cumulative value to calculate cumulative value. If yes, how can I do that?Hi.
Use a bex query to do the cumulative calculation of the monthly values. Hook that query up to a universe and retrieve it in Xcelsius.
You can set the key figure property to "cumulative" in the query designer. That should get over to the BO Universe... if not, then you can cumulate it either straight in Xcelsius (you have to know the structure anyway, in order to build the graphs...) or use a web-i report.
br
Jacob -
Inventory Management (Non-cumulative values)
Dear experts,
I want to extract inventory data from 2LIS_03_BF.
How do I have to configure the Key figures; for example: 0VALSTCKQTY. Is there a need to use Non-cumulative value with in- and outflow as in Content.
Which other possibilities exist?
After InfoObject config. - what are the exact next steps?
Do I load data from the 3 DataSources 2LIS_03_BX, 2LIS_03_BF and 2LIS_03_UM into one DSO first and then into one cube or do I have to split?
I dont want to use the BC data flow.
Thanks for your advice.
Patrickhi,
Please search the Forum for this, this has been discussed many times.
regards,
Arvind. -
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... -
Hi,
Does anyone know how to make cumulative value using ODI. For the example:
The original data:
Clothes A Jan 1,000
Clothes A Feb 4,000
Clothes A Mar 3,000
Clothes A Apr 5,000
And for cumulative, it should be:
Clothes A Jan 1,000
Clothes A Feb 5,000 (= Clothes A - Jan + Clothes A - Feb)
Clothes A Mar 8,000 (= Clothes A - Jan + Clothes A - Feb + Clothes A - Mar)
Clothes A Apr 13,000 (= Clothes A - Jan + Clothes A - Feb + Clothes A - Mar + Clothes A - Apr)
Thanks.
Regards,
SumardiHi Shamil,
I tried to run the query like this:
select
CLOTHES,
MONTH,
VALUE + (
select sum(VALUE) from TABLE ALIAS_B
where ALIAS_B.CLOTHES = ALIAS_A.CLOTHES and ALIAS_B.MONTH < ALIAS_B.MONTH
group by CLOTHES
from TABLE ALIAS_A
order by CLOTHES, MONTH
But I have a problem when I used the IKM, I cannot put the table alias (from alias), eg.: ALIAS_A and ALIAS_B (refers to query).
May I know, how to put the alias on IKM.
Note: I used IKM SQL to File Append.
Thanks for your help Shamil.
Regards,
Sumardi -
Hi,
I want to pass multiple query string values using the same parameter in Query String (URL) Filter Web Part like mentioned below:
http://server/pages/Default.aspx?Title=Arup&Title=Ratan
But it always return those items whose "Title" value is "Arup". It is not returned any items whose "Title" is "Ratan".
I have followed the
http://office.microsoft.com/en-us/sharepointserver/HA102509991033.aspx#1
Please suggest me.
Thanks | Arup
THanks! Arup R(MCTS)
SucCeSS DoEs NOT MatTer.Hi DH, sorry for not being clear.
It works when I create the connection from that web part that you want to be connected with the Query String Filter Web part. So let's say you created a web part page. Then you could connect a parameterized Excel Workbook to an Excel Web Access Web Part
(or a Performance Point Dashboard etc.) and you insert it into your page and add
a Query String Filter Web Part . Then you can connect them by editing the Query String Filter Web Part but also by editing the Excel Web Access Web Part. And only when I created from the latter it worked
with multiple values for one parameter. If you have any more questions let me know. See you, Ingo -
Bug while using string parameter values in postgresql query
Hi,
I have the following query for the postgresql database:
Code:
<queryString><![CDATA[SELECT
evt_src_mgr_rpt_v."evt_src_mgr_name" AS esm_name,
evt_src_collector_rpt_v."evt_src_collector_name" AS collector_name,
evt_src_grp_rpt_v."evt_src_grp_name" AS grp_name,
evt_src_grp_rpt_v."state_ind" AS state_ind,
evt_src_rpt_v."evt_src_name" AS src_name,
evt_src_rpt_v."date_modified" AS date_modified,
evt_src_rpt_v."date_created" AS date_created,
CASE WHEN $P{mysortfield} = 'evt_src_mgr_name' THEN evt_src_mgr_name
WHEN $P{mysortfield} = 'evt_src_collector_name' THEN evt_src_collector_name
WHEN $P{mysortfield} = 'evt_src_grp_name' THEN evt_src_grp_name
ELSE evt_src_name END as sort
FROM
"evt_src_mgr_rpt_v" evt_src_mgr_rpt_v
LEFT JOIN
"evt_src_collector_rpt_v" evt_src_collector_rpt_v
ON EVT_SRC_MGR_RPT_V."evt_src_mgr_id" = evt_src_collector_rpt_v."evt_src_mgr_id"
LEFT JOIN
"evt_src_grp_rpt_v" evt_src_grp_rpt_v
ON evt_src_collector_rpt_v."evt_src_collector_id" = evt_src_grp_rpt_v."evt_src_collector_id"
LEFT JOIN
"evt_src_rpt_v" evt_src_rpt_v
ON evt_src_grp_rpt_v."evt_src_grp_id" = evt_src_rpt_v."evt_src_grp_id"
LEFT JOIN
"evt_src_offset_rpt_v" evt_src_offset_rpt_v
ON evt_src_rpt_v."evt_src_id" = evt_src_offset_rpt_v."evt_src_id"
WHERE
$P!{mysortfield} LIKE '$P!{searchvalue}' || '%']]></queryString>
That is I try to select only the records where the field which is
selected by user as report parameter ($P{mysortfield}) contains data
starting with the text entered by user as a report parameter
($P{searchvalue}).
When I try to run the report in iReport with active connection to the
database the report is generated as expected.
But when I try to run the report from Sentinel Log Manager I get the
following error: "java.lang.String cannot be cast to
net.sf.jasperreports.engine.JRValueParameter".
After several detailed debug sessions I finally came into a conclusion
that this error is related to the use of parameter values (
$P!{mysortfield} and $P!{searchvalue} ).
I even tried using the following WHERE clause (which emulates the
queries as used in standart reports (especially at VendorProduct related
SQL queries ) with no success:
Code:
WHERE
($P{mysortfield} = 'evt_src_mgr_name' AND evt_src_mgr_name LIKE ($P{searchvalue} || '%')) OR
($P{mysortfield} = 'evt_src_collector_name' AND evt_src_collector_name LIKE ($P{searchvalue} || '%')) OR
($P{mysortfield} = 'evt_src_grp_name' AND evt_src_grp_name LIKE ($P{searchvalue} || '%')) OR
($P{mysortfield} = 'evt_src_name' AND evt_src_name LIKE ($P{searchvalue} || '%'))
Any suggestions?
hkalyoncu
hkalyoncu's Profile: http://forums.novell.com/member.php?userid=63527
View this thread: http://forums.novell.com/showthread.php?t=450687bweiner12345;2167651 Wrote:
> I'm not 100% sure the $P! (instead of just $P) is needed in that WHERE
> portion of your SQL statement.
>
> What I would suggest doing is building the WHERE portion of your query
> up again step by step. That is, instead of using any parameters in your
> WHERE:
>
> $P!{mysortfield} LIKE '$P!{searchvalue}' || '%'
>
> ... take a step back and literally hard-code some values in there, such
> as:
>
> evt_src_mgr_name LIKE '%' || '%'
>
> ... and run it on your box to make sure it works fine.
>
> If it works fine, start substituting the parameters one by one:
>
> $P{mysortfield} LIKE '%' || '%'
>
> .... test on the box.
>
> $P{mysortfield} LIKE '$P{searchvalue}' || '%'
>
> .... test on the box.
>
> It may be a little tedious, but at least you'll find out where the
> problem is occurring... and may be quicker in the long run.
>
> (Note: In my above example steps I didn't use the ! in with the
> parameters, as I don't think they are needed in the WHERE clause... but
> I could be wrong... and by following the above step-by-step technique
> should answer that for sure.)
Thank you for the suggestions:
While trying to implement your suggestions I realized that there was a
error at the parameter name I used inside the where clause (it should be
$P{searchfield}).
Here are my results:
Code:
vt_src_mgr_name LIKE '%' || '%'
worked as expected.
Code:
$P{searchfield} LIKE '%' || '%'
produced PDF but wrong output.
Code:
$P!{searchfield} LIKE '%' || '%'
resulted with the error "java.lang.String cannot be cast to
net.sf.jasperreports.engine.JRValueParameter" and no PDF.
Then I tried the following where clause which resulted in exactly as
expected PDF:
Code:
WHERE
($P{searchfield} = 'evt_src_mgr_name' AND evt_src_mgr_name LIKE ($P{searchvalue} || '%')) OR
($P{searchfield} = 'evt_src_collector_name' AND evt_src_collector_name LIKE ($P{searchvalue} || '%')) OR
($P{searchfield} = 'evt_src_grp_name' AND evt_src_grp_name LIKE ($P{searchvalue} || '%')) OR
($P{searchfield} = 'evt_src_name' AND evt_src_name LIKE ($P{searchvalue} || '%'))
As a summary:
* The query which works in iRepord do not work in Sentinel Log
Manager.
* I found a workaround for my case.
* I did not checked, but the reports provided in Sentinel RD which use
the same technique for VendorProduct parameter (i.e. the reports with
query string containing
Code:
LIKE ($P{VendorProduct} || '%')
will most probably not work as expected IF Sentinel RD uses the same
code as Sentinel Log Manager.
hkalyoncu
hkalyoncu's Profile: http://forums.novell.com/member.php?userid=63527
View this thread: http://forums.novell.com/showthread.php?t=450687 -
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 -
Using different hierarchy in a query and last value error
Hi guys,
there is a hierarchy for customers in the 0Customer Infoobject which I should use in my query.
I have activated the hierarchy in the query and now some results are not appearing but red crosses "x" are shown.
And the error message: The function Calculate Results as ... could not be applied everywhere.
I know that I am using the result as "last value" for some columns because I need them there (for example: to determine the last value for the credit limit of the current month). I think these columns where I am using the last value calculation are only affected.
I mean my query has a lot of characteristics and key figures and I was told that a hiearchy for customers which is available should be used. But now there are these red crosses.
I don´t see any other solution as not to use this specific hierarchy.
Has anybody a suggestion what could be an argument to use or not to use a hierarchy?
Is it sometimes like in my case that a hierarchy is not possible to use?
Thanks in advance!Hi,
say for example your customer hierarchy is customers grouped under region. You can maintain this region as one of the attribute of customer and you can display this attribute in the report. Indirectly, this will give similar output to that of hierarchy.
But lot depends on how your hierarchy is formed, before commenting whether it can be moved to master data attributes.
Thanks.
Maybe you are looking for
-
[svn:fx-trunk] 10943: Fix to dragging from List with multiple-selection
Revision: 10943 Author: [email protected] Date: 2009-10-08 15:46:27 -0700 (Thu, 08 Oct 2009) Log Message: Fix to dragging from List with multiple-selection - The fix is to postpone the selection commit until we make sure the user has not starte
-
Suggestions for Oracle 10g Installation using VMware in Windows XP.
Hi All, I am using Intel(R) Core (TM) 2 Duo CPU P8600 @2.4 Ghz with 1.98 GB RAM with Windows XP with 70 GB disk space. I would like to install a 2 node RAC with ASM and if possible also configure a DG for learning and testing purpose.Please advice if
-
Lightroom gets stuck when Uploading Web Galleries
Nearly each time I use the FTP function within the Web Galleries, it seems to get "Suck" at Checking FTP Connection Settings. Does anyone have a way around this? It wastes a lot of time. Thank you! WebSight My System: Dell XPS M1530 Code Duo, Windows
-
ISE integration with Prime Infrastructure,
Hi Team, I would like to know what are the advantages and Disadvantages of the ISE integration with Prime Infrastructre.Also how the LAN, wifi, and identity management part (guest access etc) will work together. Cheers!!! Minakshi
-
Screen flickering and keyboard freezing problem
Hello and happy NY to all of you! Recently I updated my arch and after I log on today I have problems with keyboard. The icon which represents some multimedial function (rewind or something) appears on random basis and flickers like if I was pressing