How to calculate the key figure value on other key figure
Hi,
I have a material character and Packing Hour, No of Boxes key figures. My requirement is i need to calculate the % no of boxes are Packed <2 Hour , 2 to 3 Hour and above 4 hour based on the packing hour.
Sample data
Material Packing hour No of boxes
001 1 hr 5 box
002 2 hr 3 box
003 2hr 7 box
004 3hr 2 box
005 5hr 1 box
Here we are not considering meterial. We are considering Only Packing hour and no of box to calculate % no of Boxes within a time period. Please help me out...to calculate % no of boxes based on hour period
Thanks,
Rama Devi
hi
its like creating buckets for analysis...
u'll have to create formula in KF...
1.
if (Pack Hrs <= 2) * No Of Boxes
2.
If (Pack Hr >= 3 or Pck Hr <= 4) * No Of Boxes
like this u'll have to create bucket..
Similar Messages
-
How to calculate the difference between values in a custom PSObject?
If I have a PSObject (created from an imported CSV) that has data like the following:
date,Total size of files uploaded
03-17-2014 09:08,1293334574547
03-17-2014 09:10,1293335326912
03-17-2014 09:13,1293336523562
03-17-2014 09:14,1293337541156
03-17-2014 09:16,1321031223511
03-17-2014 09:16,1321032156844
This CSV will have lines added to it, so the total number of lines will vary.
Is there a way that two most recently added values and calculate the difference of the "Total size of files uploaded" values?
I have the columns properly cast as datetime and
int64 already using this:
$csv = Import-Csv $csvLocation |
Where-Object { ![string]::IsNullOrWhiteSpace($_.datetime) } |
Foreach-Object {
$_.datetime = $_.datetime -as [datetime]
$_."Total size of files uploaded" = $_."Total size of files uploaded" -as [int64]
$_ }
I tried searching thinking surely there must be someone else who has tried to do this" but I cannot find anything. I am just not sure how to approach this problem. Any help would be appreciated!Assuming all of your records are sequential with the last two being the most recent you could use this:
$csv = Import-Csv $csvLocation |
Where-Object { ![string]::IsNullOrWhiteSpace($_.datetime) } | select -last 2
Foreach-Object {
$_.datetime = $_.datetime -as [datetime]
$_."Total size of files uploaded" = $_."Total size of files uploaded" -as [int64]
$_ }
$Difference = $csv[1]."Total size of files uploaded" - $csv[0]."Total size of files uploaded"
This uses the index of the imported array and just the last two records. Note that this will give a negative value if the total is less in the later record. Hope this helps!
You could also use
| sort datetime -ascending | select -last 2
if they aren't already in order... -
How to calculate the total sum value of a particular field that repeats
Hi All,
I have the following Req...File----Idoc Scenario
In the Inbound xml file i will get the Sales Order details with suppose 10 line items( 10 Orders)
Each line item represents one one SO. So totally i wil have 10 Sales Orders in this file.
<?xml version="1.0" encoding="UTF-8"?>
<ns0:MT_Sales_Order xmlns:ns0="http://sap/Sales_Order">
<Header>
<COMP_CODE></COMP_CODE>
<DOC_TYPE></DOC_TYPE>
<SUPPL_VEND></SUPPL_VEND>
</Header>
<Item>
<ITEM></ITEM>
<MATERIAL></MATERIAL>
<PLANT></PLANT>
<QUANTITY></QUANTITY>
<Amount></Amount>
</Item>
In the above structure Item Segment will repeats as many no. of Sales Orders comes in a file.
In a file if there are 10 Orders means the Item segment wil repeats 10 times.
I have the Amount field in the Item Segment, each and every time that needs to be added to next Amount value that presents in the next Line Item.
Finally i will have the Another separate field caled Grand Total, and i have to get the total summation of the 10 values of the Amount field at last.
Can we achieve this using UDF or is there any way to do this
REgardsHi,
Do like this, actually in your case sum is taking place before the condition check for discount type
do a little change in mapping
DiscntType--removeContext--
EqulsS-------IfWithoutElse----Amount---removecontext--then---SUM-
Connstatnt(Value)
--->GrandAmount
Krishna, Check the same question asked by Rajesh in thread Calculate totals of segments that occur multiple times
Thanks! -
How to calculate the Last sold value
Hi All,
Can we get the material last sold price based on the materials, suppose 20/11/2007 my material has been sold with value of $100, on 15/11/2007 same material sold with value of $80, so in my report coloum i wolud like to see the value as $80,
Best regards,
Rams.Hi Sam,
I have already tried, but the result is showing wrong, could u pls provide any other solution.
Best Regards,
Rams. -
How to get the Key value in the value help?
Hi All,
I am using dropdown by key to display the values from the RFC. I am able to get the text by,
ISimpleValueSet div = wdThis.wdGetContext().getContext().getModifiableTypeOf ("Header.VH_BUnit").getSVServices().getModifiableSimpleValueSet();
return div.getText(wdContext.currentHeaderElement().getVH_BUnit());
Please say how to get the key ?
Thanks & Regards,
MugundhanHi,
Thanks for ur reply. wdContext.currentHeaderElement().getVH_BUnit() is returning the value in the dropdown only.
Consider this line..
return div.getText(wdContext.currentHeaderElement().getVH_BUnit() );
More simillarly return div.gettKey(................); is there. What value should be given inside. if i gave wdContext.currentHeaderElement().getVH_BUnit() means, it sowing "Cannot convert from object to String " error.
So i created an object like this,
Object attributevalue = wdContext.currentHeaderElement().getAttributeValue(IPublicReportrtComp.IHeaderElement.VH__B_UNIT);
But this too not accepting..
Thanks & Regards,
Mugundhan -
hello everyone,
i'm rai from indonesia
I have a final project about pulse oximetriy, I have some problems,
how to calculate the ratio between the maximum and minimum peaks of the two waves using two while loops to calculate SpO2 ?
My program image can be seen below predicament ?
Attachments:
spo2 akusisi data with filter lpf hpf smoot nilai max min ir merah.vi 249 KB
spo2 akusisi data with filter lpf hpf smoot nilai max min ir merah.vi 249 KBHi rai,
I would appreciate it as kind of respect for forum participants if you would clean up your VI before uploading it (or images of its block diagram)…
That being said:
- Your inner while loops each run exactly twice. Replace them with FOR loops!
- Lots of unneeded operations, mainly induced by ExpressVI usage. Is there a reason to convert to DDT and immediately convert back to 1D array?
- You already calculate some Min/Max values. Ratio is just a division of two values…
Best regards,
GerdW
CLAD, using 2009SP1 + LV2011SP1 + LV2014SP1 on WinXP+Win7+cRIO
Kudos are welcome -
How to calculate the mt_bf (optimum blocking factor) in mtio.h?
Hi geniuses,
One of our customers asks our tape driver to support the mt_bf defined as optimum blocking factor in mtget structure in mtio.h. The mt_bf is supported in MTIOCGET ioctl in Solaris native tape driver -- st. I can not find any Solaris document how to calculate the value for Developers. Please help me to figure out if you know the answer.
Thanks in advance!I would have liked this as a homework assignment when I was in college - beats the heck out of "find the range of a given artillery shell..."
good luck with it, looks fun
Lee -
How to calculate the difference of two totals which are of the same group?
Post Author: mingli
CA Forum: Formula
Hello,
I have an existing report which has a group defined. The group generates two set of data, at the footer of each set of data, the total is calcuated. Now I need to calculate the difference between the totals. For example:
value
set 1
item 1 100
item 2 200
item 3 300
set 1 total 600
set 2
item 1 200
item 2 20
item 3 300
item 4 40
set 2 total 560
difference 40
My question is: how can I do this? I'm thinking about create a formula. But the problem is, these two totals have the same field name. Could someone help me out?
Thanks.Post Author: deejayw
CA Forum: Formula
Hi,I have a similar type of query...my Sets only ever contain two entries but there is an unknown number of sets. value
set 1
item 1 100
item 2 200
difference (item2 - item1) = 100
set 2
item 1 200
item 2 20difference (item2 - item1) = -180
Set 3, Set 4, etc, etc I need to figure out how to calculate the "difference (item2 - item1)" total above. I am really confused by this and need assistance. Many thanks. -
How to calculate the unit for RATE?
Hey All,
I am not sure if there is something standard for this or not.
I am calculating the 'Rate' by using 'Value/Amount' and 'Quantity' as follows -
Rate == Value / Quantity
I need to calculate the unit for the rate as below -
Rate unit == Value unit (Currency) / Quantity unit (Base_uom)
(for example -
if value is 1000 USD and quantity is 10 TO then Rate should come out as 100 USD / TO)
Could anyone please suggest how to calculate the unit in this case?
Many Thanks!
TanuHi,
Go through the below link it may give some idea
http://help.sap.com/saphelp_nw04/Helpdata/EN/19/1d7abc80ca4817a72009998cdeebe0/content.htm
Regards,
Marasa. -
How to calculate the Current APC (Acquisition and Production Cost)
Hi,
Please help me how to calculate the Current APC.
The Current APC (Acquisition and Production Cost) is a calculated value based on Previous Year Acquisition balance plus any value changes up to the time of the report.
The Asset History Report (RAGITT_ALV01) calculates the Current APC value &
The Current APC can also be found in the Asset Explorer (transaction code AW01N) under Country Book 10/ Posted Values tab then the line Acquisition Value and column Posted values.
I suppose that the calculation of Current APC (Acquisition and Production Cost) is getting done in the GET statements in the report RAGITT_ALV01, but unable to find the actual logic.
Please help me.
Thanks in advance,
SatishHi,
you'll find the logic in fm FI_AA_VALUES_CALCULATE
A. -
How to calculate the Current APC
Hi,
Please help me how to calculate the Current APC.
The Current APC (Acquisition and Production Cost) is a calculated value based on Previous Year Acquisition balance plus any value changes up to the time of the report.
The Asset History Report (RAGITT_ALV01) calculates the Current APC value &
The Current APC can also be found in the Asset Explorer (transaction code AW01N) under Country Book 10/ Posted Values tab then the line Acquisition Value and column Posted values.
Thanks in advance,
SatishHi,
I suppose that the calculation of Current APC (Acquisition and Production Cost) is getting done in the GET statements in the report RAGITT_ALV01, but unable to find the actual logic where it is being done.
Please help me.
Thanks in advance,
Satish -
How to calculate the variance in PO price history?
hi
i hav standard report ME1P, since i need to do some modifications in this program i copied to Y prgrm,,,'
im getting all the values properly...
but my prblm is im not getting how to calculate the variance? im not getting the logic behid it...
can anybody expln me in breif plz....
Regards
SmithaHi Venu,
there is another way as well, however, you won't be able to see Variance and Variance% as a saperate keyfigure which is not under the period. Thats the reason I didn't mention it earlier.
What you can do is, Drag the period to the columns, Now create a structure that has the two keyfigures std price, moving price. Here if you add Variance and Variance%, Then these CKF's would come under period as well, which you don't need. And the system won't allow you to add these CKF's outside this structure. The reason being because the interpretation of the data then wouldn't make any sense here. You can create a new structure as well with these CKF's but they would become a subpart of your previous structure.
choose the required characteristics in the Rows section. Save it.
Let us know, Sorry man, can't help u much at this problem.
regards,
Sree. -
How to calculate the individual sums of multiple columns in a single query
Hello,
Using Oracle 11gR2 on windows 7 client. I have a question on calculating sum() on multiple columns on different columns and store the results in a view. Unfortunately I could not post the problem here as it keeps on giving error "Sorry, this content is not allowed", without telling where or what it is! So I had to post it in the stack-overflow forum, here is the link: http://stackoverflow.com/questions/16529721/how-to-calculate-the-individual-sums-of-multiple-columns-in-a-single-query-ora
Will appreciate any help or suggestion.
Thanksuser13667036 wrote:
Hello,
Using Oracle 11gR2 on windows 7 client. I have a question on calculating sum() on multiple columns on different columns and store the results in a view. Unfortunately I could not post the problem here as it keeps on giving error "Sorry, this content is not allowed", without telling where or what it is! So I had to post it in the stack-overflow forum, here is the link: http://stackoverflow.com/questions/16529721/how-to-calculate-the-individual-sums-of-multiple-columns-in-a-single-query-ora
Will appreciate any help or suggestion.
ThanksLooks like you want a simple group by.
select
yr
, mnth
, region
, sum(handled_package)
, sum(expected_missing_package)
, sum(actual_missing_package)
from test
group by
yr, mnth, region
order by
yr, mnth, region;I wouldn't recommend storing your data for year / month in 2 columns like that unless you have a really good reason. I would store it as a date column and add a check constraint to ensure that the date is always the first of the month, then format it out as you wish to the client.
CREATE TABLE test
year_month date,
Region VARCHAR2(50),
CITY VARCHAR2(50),
Handled_Package NUMBER,
Expected_Missing_Package NUMBER,
Actual_Missing_Package NUMBER
alter table test add constraint firs_of_month check (year_month = trunc(year_month, 'mm'));
ME_XE?Insert into TEST (year_month, REGION, CITY, HANDLED_PACKAGE, EXPECTED_MISSING_PACKAGE, ACTUAL_MISSING_PACKAGE)
2 Values (to_date('2012-nov-12', 'yyyy-mon-dd'), 'Western', 'San Fransisco', 200, 10, 5);
Insert into TEST (year_month, REGION, CITY, HANDLED_PACKAGE, EXPECTED_MISSING_PACKAGE, ACTUAL_MISSING_PACKAGE)
ERROR at line 1:
ORA-02290: check constraint (TUBBY.FIRS_OF_MONTH) violated
Elapsed: 00:00:00.03
ME_XE?Insert into TEST (year_month, REGION, CITY, HANDLED_PACKAGE, EXPECTED_MISSING_PACKAGE, ACTUAL_MISSING_PACKAGE)
2 Values (to_date('2012-nov-01', 'yyyy-mon-dd'), 'Western', 'San Fransisco', 200, 10, 5);
1 row created.
Elapsed: 00:00:00.01
ME_XE?select
2 to_char(year_month, 'fmYYYY') as year
3 , to_char(year_month, 'fmMonth') as month
4 , Region
5 , CITY
6 , Handled_Package
7 , Expected_Missing_Package
8 , Actual_Missing_Package
9 from test;
YEAR MONTH REGION CITY HANDLED_PACKAGE EXPECTED_MISSING_PACKAGE ACTUAL_MISSING_PACKAGE
2012 November Western San Fransisco 200 10 5
1 row selected.
Elapsed: 00:00:00.01
ME_XE?Then you have nice a nice and easy validation that ensures you data integrity.
Cheers, -
How to calculate the average inventory in ABAP
Dear All,
Please find the below formula and this formula how to calculate the Average inventory at value.Please let me know the abap base tables and the corresponding fields.
Formula
Inventory Turnover = Cost of Goods Sold (COGS) / Average Inventory at value.
Thanks
Regards,
SaiHi Arivazhagan,
Thanks for your quick response .
The field MBEWH from the table is fulfill the average inventory at value.
For Eg :I want to calculate Inventory Turnover = Cost of Goods Sold (COGS)/
Average Inventory at value.
so shall i take Inventory Turnover = Cost of Goods Sold (COGS)/MBEWH
The above formula will meet my requirement to find the average inventory Turnover.
Thanks
Regards,
Sai -
Hi,
I am having a table of 4 column. First column is varchar2(10), Second column is Number(5), Third column is char(10) and Fourth column is Number(12,2).
Now how to calculate the size of each row. I want to know how much space it will take for each row.
Thanx & Regards,
SwarupFor a complete discussion of storage requirements for different datatypes see the Oracle 8i Concepts manual.
All Oracle documentation is available on-line via the 'Documentation' link on the OTN home page.
Your Col2 NUMBER(5) will take 4 bytes if it holds a 5 digit positive or negative number.
Your Col4 NUMBER(12,2) will take 7 bytes if it holds a number with 12 digits that is positive and will take 8 bytes if it holds a number with 12 digits that is negative.
The following is from the Concepts manual Chapter 12 (Copyright by Oracle)
Built-In Datatypes 12-9
Internal Numeric Format
Oracle stores numeric data in variable-length format. Each value is stored in
scientific notation, with one byte used to store the exponent and up to 20 bytes to
store the mantissa. The resulting value is limited to 38 digits of precision. Oracle
does not store leading and trailing zeros. For example, the number 412 is stored in a
format similar to 4.12 x 10 2 , with one byte used to store the exponent (2) and two
bytes used to store the three significant digits of the mantissa (4, 1, 2). Negative
numbers include the sign in their length.
Taking this into account, the column size in bytes for a particular numeric data
value NUMBER ( p), where p is the precision of a given value, can be calculated
using the following formula:
ROUND((length( p)+ s)/2))+1
where s equals zero if the number is positive and s equals 1 if the number is
negative.
Zero and positive and negative infinity (only generated on import from Version 5
Oracle databases) are stored using unique representations. Zero and negative
infinity each require one byte; positive infinity requires two bytes.
null
Maybe you are looking for
-
Insert silence in the wrong place
I'm having a problem where, when I do Process > Insert > Silence, it puts the silence in a different place about 10 seconds behind where the cursor is. Any idea why this would be happening?
-
How to Filter a DVWP for other list items with same name?
I have 2 lists, Clients & Engagements. The Engagements list has a lookup field to the Clients list (to the Title). The Engagements list often has more than on listing (job) for the same client at one time. I am trying to create a DisplayForm on the E
-
Hello, We have upgraded our GUI to 7.10 (EP 6) with no problem apart from one thing. When we try and access the SRM system through the portal, on a transaction iview (SMEN) it takes ages to connect but eventually succeeds. There is no problem accessi
-
Bug typedef does not connect to expression node
Attached is a simple vi that tries to connect a typedef (in this case a double) to an expression node. Since LV8 this is not allowed anymore. We choose LabVIEW because it was possible to use it as a strict typed language. (one of the reasons). We see
-
A small Java Problem for java Experts
Hi Guys... I have a small problem with my program... Tha program I am using consist of several frames where one invokes the other in row. These are the classes I am using: the FIRST class://THIS CLASS IS NOT COMPLETE import java.io.*; import java.awt