How to calculate variance between two dimension values
Hello:
I have built a cube in Analytical workspace (9.2.0.5) with 3 dimensions. Time, Product & Scenario. I am using BI Beans (thick client) for the presentation layer. What I need is the ability to calculate the variance between two dimension values of same measure. For example, if My scenarios are 'Actual' and 'Budget', when I present the results on the screen for any measure (e.g Total Sales), I should be able to calculate & display the difference between 'Actual' & 'Budget' values of that measure.
I have more than 7 scenarios and more than 40 measures. It could even be the difference between two product categories. How do I do it either in AW or at BI Beans Level?
Thank you very much for your help.
regards
Suresh
You want to look at qualified data references in the OLAP DML references. Basically, any data reference may be qualified by specifying a dimension name and value:
sales(time 'jan92')
forces the dimension TIME to the member 'jan92', no matter whether 'jan92' is in status or not. The resulting expression is essentially no longer dimensioned by the dimension TIME.
Similar Messages
-
How to calculate days between two DATES
How to calculate days between two DATES ?
which is the functional module for that ?
help meHi,
use function module : it works,
HR_HK_DIFF_BT_2_DATES
give output format = 03 and get the value in days.
code is as below :
data : DATE1 type P0001-BEGDA,
DATE2 type P0001-BEGDA,
YEARS type P0347-SCRYY,
MONTHS type P0347-SCRMM,
DAYS type P0347-SCRDD.
date1 = '20070331'.
date2 = '20070101'.
CALL FUNCTION 'HR_HK_DIFF_BT_2_DATES'
EXPORTING
DATE1 = date1
DATE2 = date2
OUTPUT_FORMAT = '03'
IMPORTING
YEARS = years
MONTHS = months
DAYS = days
EXCEPTIONS
INVALID_DATES_SPECIFIED = 1
OTHERS = 2
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
write : days.
Reward points, if helpful,
Regards,
Sandeep Kaushik -
How to calculate hours between two dateTime node in BPEL.
In my BPEL there's a requirement need calculate hours between two dateTime type..
I tried 2 solutions, both of them failed:
1. use xslt calculate duration(xml type, like PT12H) between two dateTime, and then use embedded java code to get the hours.. The problem is : I need to parse the xml duration format...(like this real one: -P80DT17H47M36S....), and to parse it in java , maybe have the same problem with solution 2..
* [Subtracting 2 dateTime values into a duration using XPath 2.0|http://blogs.oracle.com/rammenon/2007/07/subtracting_2_datetime_values.html]
2. use embed java code, but it seems we can't use some class in embedded java code:
my code(input begin, end both dateTime in xml. output: diff, int in xml):
1 System.out.println("\n\nTimeTestBegin");
2 String begin=getVariableData("begin").toString();
3 String end=getVariableData("end").toString();
4 System.out.println(begin+"-----"+end);
5 //Class c1=Class.forName("javax.xml.datatype.XMLGregorianCalendar");
6 //Class c2=Class.forName("javax.xml.datatype.DatatypeFactory");
7 //System.out.println(c1.getName());
8 //System.out.println(c2.getName());
9 javax.xml.datatype.XMLGregorianCalendar beginTime = javax.xml.datatype.DatatypeFactory.newInstance().newXMLGregorianCalendar(begin);
10 javax.xml.datatype.XMLGregorianCalendar endTime = javax.xml.datatype.DatatypeFactory.newInstance().newXMLGregorianCalendar(end);
11 long diff=beginTime.toGregorianCalendar().getTimeInMillis()-endTime.toGregorianCalendar().getTimeInMillis();
12 setVariableData("diff",String.valueOf(diff/1000/3600));
13 System.out.println("DIFF======"+diff/1000/3600);
14 System.out.println("TimeTestEnd");
it's said can't compile java class, but can't find the detail error, I think the problem is how to import java class to embedded java code activity(use full package name like above code don't work), when I remove line 9-13, no compile error..
BTY: Jdeveloper is a IDE support java, but why the embedded java activity's edit window only have a simple "java code" editor, too simple that it can only edit you code snippet...
3.There's another sulotion: extend BPEL xpath functions(add a new function), but in my project, modify BPEL server(soa server)'s config file is not allowed..
Anyone know easy solution to my problem?
Thanks.Hi, All,
I found the cause. Sorry, it's my mistake..
below line have a DatatypeConfigurationException:
javax.xml.datatype.DatatypeFactory.newInstance()
When I test my java code snippet, I coped the code snippet to one of my java class in eclipse, and put it in a method to check if there's compile error, but I didn't notice there's a "throws Exception"...
the final java code snippet for test is :
input: begin dateTime
input: end dateTime
output: diff int, how many hours in (begin-end)
try{
System.out.println("\n\nTimeTestBegin");
String begin=getVariableData("begin").toString();
String end=getVariableData("end").toString();
System.out.println(begin+"-----"+end);
javax.xml.datatype.XMLGregorianCalendar beginTime = javax.xml.datatype.DatatypeFactory.newInstance().newXMLGregorianCalendar(begin);
javax.xml.datatype.XMLGregorianCalendar endTime = javax.xml.datatype.DatatypeFactory.newInstance().newXMLGregorianCalendar(end);
long diff=beginTime.toGregorianCalendar().getTimeInMillis()-endTime.toGregorianCalendar().getTimeInMillis();
setVariableData("diff",String.valueOf(diff/1000/3600));
System.out.println("DIFF======"+diff/1000/3600);
System.out.println("TimeTestEnd");
}catch(Exception e){
e.printStackTrace();
} -
How should calculate variance between dynamic input?
HI Experts,
how should calculate Actual cost varience between two month.Hi
From the screen shot it says only u r using 2 months here.
But if you are running for year,then this can be the steps.
1.sort month ..go to values and the arrange .
2.The data should display properly monthly wise
3.Then If you have direct month object then create Previous([Month]).we have previous function
4.write Diff=[Actual Cost]-Previous Actual Cost -
How to Calculate second between two dates?
I'm wish to create a ref ID using seconds between two dates as the uniue number. I usually use DateDiff function in VB to calculate the ref ID. But now instead developing using VB, i'm using java in developing my project. I wonder is there any class similar to the datediff function? Please advice.Thank you
diff_sec =( Date1.getSeconds() - Date2.getSeconds());
-
Calculate the variance between two row
Post Author: jane
CA Forum: WebIntelligence Reporting
Hi,
I'm new to BO and wondering whether there is a way to calculate the variance between two rows. I'm working on a report which requires to display the change of two day's data. For instance, I have a table in a format as
Date
Sales Amount
3/12/2008
2300.00
2/12/2008
1280.00
Changed
1020.00
I'd like to display the "Changed" column. Is there a way to do that in BO InfoView? In Excel, you can use the formular by identify the two cells.
Thanks!Post Author: Vinl
CA Forum: WebIntelligence Reporting
I am having the same problem and am steping outside of the box and cannot progress.
Seems to me that you are kind of saying that the only way to get around this is to create an individual object in Designer? I cannot find a way of cementing values as a variable in order for a variance to be created.
I am trying to do it at column level mind you, which should not make that much difference....
Simple SQL database. I have created an object called "Year" which takes a date and converts it to a year. I then have another object created "Total sales", put the 2 in a table get the right results...try and create a year on year variance from that...no chance...
Used to work ok...? -
How to get space between two values in a single cell of a table.
hello,
how to get space between two values in a single cell of a table.
thanks a lot.
kailash.sorry i got the answer.
-
In jsp file, how to transfer parameter between two javabean?
In jsp file, how to transfer parameter between two javabean?
for example
Bean1 has a attribute A
Bean2 has a attribute B
how to transfer the value of A to BHave you tried something like...
<jsp:setProperty name="Bean2" property="B" value="<jsp:getProperty name="Bean1" property="A" />" /> -
Perform division operation of two dimension values
Hi ,
I have a requirement like I need to divide two dimension values from 2 different tables?.. Can anyone please suggest whether I can do it in Obiee report level or i need to do it in RPD level. If so pls suggest how to do it?..
Regards,
Vengatesh.Are these two tables are joined in the repository if yes then :-
then then you can directlly take
2 columns from these tables in answers and create new column in answer as Result_div
under fx of that column write column1/column2
Cheers
Nawneet -
Calculate difference between two dates/times
Hi all,
Is there any function module to calculate difference between two dates/times which are in TIMESTAMPL format.
I need to know how many millisconde(second,minutes, hours... )there is between these two times.
Please, It is urgent
Thank you all.
Karimhi,
try the following function
CALL FUNCTION 'CCU_TIMESTAMP_DIFFERENCE'
EXPORTING
timestamp1 = timestamp1
timestamp2 = timestamp2
IMPORTING
difference = diff
EXCEPTIONS
OTHERS = 1.
the above function gives the difference in seconds...
try the following code to set the resolution to milliseconds..
SET RUN TIME CLOCK RESOLUTION LOW
check the thread for details:
SET RUN TIME CLOCK RESOLUTION?
all the best!!!
Regards,
Aparna -
How to pass parameters between two xterm windows?
Hi,
I would like to know how to pass parameters between two xterm windows where there are two independence processes running on them respectively ? Would appreciate if any one out there can advise me . Thanks.Global variables can be used, but you can do what the online help
says ...
Parameters are passed to called forms by means of a parameter
list. A parameter list is a named programmatic construct that is
simply a list of parameter names (called keys) and their values.
You can pass parameter values to forms invoked by the built-in
subprograms CALL_FORM, OPEN_FORM, and NEW_FORM. In addition, you
can pass parameter values to other Oracle tools with the
RUN_PRODUCT procedure.
A parameter you include in a parameter list can be either a text
parameter or a data parameter. The parameter type determines how
its value is interpreted.
Text Parameters The value of a text parameter being passed to a
called product is a CHAR string that can represent the following:
n a user-defined form parameter defined in a form invoked
by the CALL_FORM, OPEN_FORM, or NEW_FORM built-in subprograms
n a command line or user-defined parameter for a product
invoked with the RUN_PRODUCT built-in subprogram
Data Parameters The value of a data parameter being passed to a
called product is always the name of a record group defined in
the current form. (A record group is a data structure that
stores records derived from a query or through programmatic
assignment.) Data parameters are used to pass data to products
invoked with the RUN_PRODUCT built-in subprogram. You cannot
pass data parameters to forms.
The following table shows the structure of a parameter list that
contains four parameters:
Key Paramtype Value
CITY Text_Parameter 'BOGOTA'
CATEGORY Text_Parameter 'EXPORTS'
MULTIPLIER Text_Parameter '.0275'
NEW_DATA Data_Parameter 'RECORD_GROUP8'
arun reddy (guest) wrote:
: im trying to do this but i could not find any way for this.
: can any one help me how can i pass parameters between two forms
: in forms4.5. any help will be appreciated
: thanks.
null -
How to pass data between two internal sessions using ABAP memory?
Hi,
How to pass data between two internal sessions using ABAP memory?
It would be fine if you could explain with an example.
And also let me clear about the data passing between two main sessions and two external sessions with specific examples.
Thanks.Hi ,
check the example.
Reading Data Objects from Memory
To read data objects from ABAP memory into an ABAP program, use the following statement:
Syntax
IMPORT <f1> [TO <g 1>] <f 2> [TO <g 2>] ... FROM MEMORY ID <key>.
This statement reads the data objects specified in the list from a cluster in memory. If you do not use the TO <g i > option, the data object <f i > in memory is assigned to the data object in the program with the same name. If you do use the option, the data object <f i > is read from memory into the field <g i >. The name <key> identifies the cluster in memory. It may be up to 32 characters long.
You do not have to read all of the objects stored under a particular name <key>. You can restrict the number of objects by specifying their names. If the memory does not contain any objects under the name <key>, SY-SUBRC is set to 4. If, on the other hand, there is a data cluster in memory with the name <key>, SY-SUBRC is always 0, regardless of whether it contained the data object <f i >. If the cluster does not contain the data object <f i >, the target field remains unchanged.
In this statement, the system does not check whether the structure of the object in memory is compatible with the structure into which you are reading it. The data is transported bit by bit. If the structures are incompatible, the data in the target field may be incorrect.
PROGRAM SAPMZTS1.
DATA TEXT1(10) VALUE 'Exporting'.
DATA ITAB LIKE SBOOK OCCURS 10 WITH HEADER LINE.
DO 5 TIMES.
ITAB-BOOKID = 100 + SY-INDEX.
APPEND ITAB.
ENDDO.
EXPORT TEXT1
TEXT2 FROM 'Literal'
TO MEMORY ID 'text'.
EXPORT ITAB
TO MEMORY ID 'table'.
SUBMIT SAPMZTS2 AND RETURN.
SUBMIT SAPMZTS3.
The first part of this program is the same as the example in the section Saving Data Objects in Memory. In the example, the programs SAPMZTS1 and SAPMZTS2 are called using SUBMIT. You can create and maintain the programs called using the SUBMIT statement by double-clicking their names in the statement. For further information about the SUBMIT statement, refer to Calling Executable Programs (Reports)
Example for SAPMZTS2:
PROGRAM SAPMZTS2.
DATA: TEXT1(10),
TEXT3 LIKE TEXT1 VALUE 'Initial'.
IMPORT TEXT3 FROM MEMORY ID 'text'.
WRITE: / SY-SUBRC, TEXT3.
IMPORT TEXT2 TO TEXT1 FROM MEMORY ID 'text'.
WRITE: / SY-SUBRC, TEXT1.
Example for SAPMZTS3:
PROGRAM SAPMZTS3.
DATA JTAB LIKE SBOOK OCCURS 10 WITH HEADER LINE.
IMPORT ITAB TO JTAB FROM MEMORY ID 'table'.
LOOP AT JTAB.
WRITE / JTAB-BOOKID.
ENDLOOP.
The output is displayed on two successive screens. It looks like this:
and
The program SAPMZTS2 attempts to read a data object TEXT3 from the data cluster "text", which does not exist. TEXT3 therefore remains unchanged. The existing data object TEXT2 is placed in TEXT1. In both cases, SY-SUBRC is 0, since the cluster "text" contains data.
The program SAPMZTS3 reads the internal table ITAB from the cluster "table" into the internal table JTAB. Both tables have the same structure, namely that of the ABAP Dictionary table SBOOK.
Pls. reward if useful..... -
SSRS expression for difference between two currency values
Hi All;
I need to get the difference between two currency values
Below is my report
I need to get differene between Actual Income and Profile Income and this value should be in "£" In this example it should be £0.00
Any help much appreciated
Thanks
Pradnya07=sum(Fields!ProfileIncome.Value - Fields!ActualIncome.Value)
This could have either field first, but depends on which field is expected to be larger. You would then format the textbox to show in pounds.
HTH -
How to get relationship between two views in the reports
How to get relationship between two views in the reports, I am doing a deletion program , it is fully relates to views , how to get relationship between them in the reports
Hi,
Please explain your question in detail...what do you want to read ?
If you want to know about the navigation links between the views then you can use APIs like
wdComponentAPI.getComponentInfo().findInWindows("windowName").getViewUsageByID("Name").getNavigationLinks();
Iterate through the navigationLinkInfo from above collection and can read the other properties .
I haven't tried the above , but it should work !!!
Regards,Anilkumar -
How can we navigate between two windows of same component in webdynpro ABAP
Hi
how can we navigate between two windows( not views ) of same component in webdynpro ABAP. its an urgent requirement
Thanks in advance.
Regards
LaeeqHi Laeeq,
You cannot navigate between windows of one component. You can only call a dialog box showing the contents of a second window, or you can embed the contents of a window of a different component.
Just add all the views you need to the one and only main window of the component.
Ciao, Regina
Maybe you are looking for
-
Problem with using two different apple IDs on the same iPhone 4s
my friend installed an app on my iPhone 4s using his apple ID. Then I created an apple ID for my own use. I then installed an app on my iphone. But, there's a pop-up box containing my friend's ID and asked me to put his password. How can i use my own
-
Hi plz help I have made presentation in flash cs4. I have one main file Index & loading rest all the files through LoadMovie. I want to convert my presentation into AVI for video but when i export it in avi so it converts in AVI but its not taking th
-
I have recently installed the new Itunes and the radio stations are not showing up. I have reinstalled and repaired Itunes and still nothing. Has anyone else had this problem?
-
Migration of forms 3.0 to 6i
My old system which is on forms3.0, now i want to upgrade it on forms 6i . plz tell me ifthere is any tool which convert .pco files into .fmb files. i already try with ifcmp60.EXE but it won't fully converted the pco file. plz reply if you have any s
-
How to delete playlists listed under iPod on the Preferences panel?
I have a pesky problem. When I synced my iPod, I got all sorts of playlists of CD's I've added to iTunes in the past (dozens). So, I deleted them in iTunes and re-synced my iPod, only to find the lists there again. I noticed that those old playlists