Use of Average Function in repository

Hi,
I need to use the average function on a derived column in the repository.
The requirement is to find different between two dates and then perform an average for a particular time period on the difference.
AVG(TIMESTAMPDIFF(SQL_TSI_DAY, Deposit_date, Withdrawal_Date))..This is the sample of my requirement in the repository.
I am not able to use it as I get the following error..
[38083] The Attribute defines a measure using an obsolete method.
How can I get past this and use the average function in the repository..I cannot pass this to the answers part as this is a adhoc reporting DM.
Any help will be greatly appreciated.
This requirement is for OBIEE 10.1.3
Thanks
Edited by: vjbez1 on Dec 3, 2012 6:24 AM

OBIEE doesn't support aggregate functions in formulas that are built from logical columns. Use logical columns that already have an aggregate function defined to build formulas. Alternatively, add this under the General section of your NQSConfig.ini file: SUPPORT_OBSOLETE_MEASURES = YES;
Please mark if helpful/correct.

Similar Messages

  • How can I use Seeburger java functions on SAP XI's user defined functions?

    Hi All,
    As my title implies; how can I use Seeburger java functions on SAP XI's user defined functions?  I've tried searching over the net in tutorials regarding this topic but I failed to find one; can someone provide me information regarding my question? thanks very much.
    best regards,
    Mike

    Hi Mike !
    You should check your documentation about which java classes you need to reference in the "import" section of your UDF. And also deploy the java classes into the java stack or include them as a imported archive in integration repository...it should be stated in the seeburger documentation.
    What kind of functions are you trying to use?
    Regards,
    Matias.

  • Product Costing using Moving Average Price of FERT & HALB

    Dear Experts,
    My client wants to use Product Costing functionality by using Moving Average Price instead of Standard Price on Finished Goods & Semi Finished Goods and as per my understanding, SAP recommends to use Standard Price on FERT &  HALB.
    I know if we use moving average price instead of standard price than there will be no concept of variances. Can anyone tell me more about what are the pros and cons of using moving average price instead of standard price in Product Costing?
    Thanks in advance.
    Regards,
    Zain Bashir

    Hi Zain
    Let's take an example
    You have V for Mat A
    You create 3 Prod orders in a month
    Order 1 - Qty 10 - variance 100
    Same for Order 2 and 3..
    At month end, you sold 20 pieces and 10 is in stock..
    When you settle order 1, system will compare order qty and stock.. It will match I.e. 10 = 10... Hence variance of 100 will be posted on stock
    Same will happen for Order 2 and 3... Ideally, only 100 should have posted on stock... but in this case 300 of variance will be posted on stock...
    This is what the note mentioned by Arturo tells, but not so clearly
    Hope this helps
    Br. Ajay M

  • I'm new to Mac and the program/all called Numbers. I'm trying to use both Average and small in the same formula. What's I'm trying to do is take 20 cells, find the 10 lowest numbers, then get the average and after that multiply it by .96

    I'm new to Mac and the program/all called Numbers. I'm trying to use both Average and small in the same formula. What's I'm trying to do is take 20 cells in a column,  find the 10 lowest numbers, then get the average and after that multiply it by .96  I used to use Excel and the formula worked fine in that. Here is my Formula
    =(average(small(H201:H220,{1,2,3,4,5,6,7,8,9,10})))*.96
    This formula worked in Excel and when I converted my spreadsheet over to Numbers, this formula no longer works.
    The best that I have been able to do so far is use small in 10 different cells, then get the average of the 10 cells and finally multiply that average by .96  So instead of using 1 cell, I'm using 12 cells to get my answer.
    This is a formula that I will be using all the time. The next cell would be =(average(small(H202:H221,{1,2,3,4,5,6,7,8,9,10})))*.96
    Hoping I explain myself well enough and that someone can help me.
    Thanks

    You can still do it in one cell but it will be more unruly than the Excel array formula.
    =average(small(H201:H220,1),small(H201:H220,2),small(H201:H220,3),...,small(H201:H220,10))*0.96
    where you would, of course, replace the "..." with the remaining six SMALL functions.

  • Synchronisation problem when using iFS as Portal document repository

    Is anyone using 9iFS as the repository for their Portal documents but getting DRG-11602: URL store: access to <file name> requires authentication when synchronising the PORTAL30.WWSBR_URL_CTX_INDX index. This is run under schema CTXSYS, using ctx_schedule.
    We use a URL on the Portal folder to access the iFS document and, if the ACE on the document ACL includes World Read, then the document is indexed correctly but if it has no World Read access then synchronisation fails with the above error. These secure documents are indexed correctly, however, when synchronising IFSSYS.IFS_TEXT.
    When you put the URL for the document in the browser then you are prompted for an iFS username/password and this is obviously the problem when synchronising. Oracle Support say that the Oracle 9i Oracle Text Reference, Chapter 2: Indexing, definition of URL_DATASTORE states :The login:password@ syntax within the URL is not supported. Oracle Support have also suggested that using iFS as the Portal repository is not standard practice and that we should simply add our documents as items on the folder. Doing this means not being able to take advantage of the added functionality of iFS such as versioning and, anyway, I thought that Oracle had plans to fully integrate the two products with iFS being the default repository in a future release of Portal.
    Until then has anyone got any ideas for a workaround because we are unable to index the contents of all secure documents on our Corporate intranet? We cant be the only site using iFS and Portal in this way!

    Hello Raymond,
    I must say that I downloaded the JBoss Portal Binary and not the bundle JBoss AS + JBoss Portal, because I already had a JBoss AS working, so it was the best way to do it (as it is said in the JBossPortalReferenceGuide). I have both things (server and portal) in the same directory, but I don't know if maybe one of them should contain the other (I have seen that in the bundle, the portal directory contains the JBoss application server) When I downloaded the JBoss Portal and tried to deploy it by directing my web browser to http://localhost:8080/portal it did not work, so I decided to copy the jboss-portal.sar directory from the JBoss Portal to the deploy of my server. Maybe this was a mistake.
    But anyway I have seen that JBoss Portal 2.6 comes with the myfaces jars, and as JBoss AS 4.2 uses Sun RI by default, it is going to collapse anyway. Should I just remove these jars from the portal? As I told you before, I tried doing it and I got two errors of not found classes.
    Please, any help would be really appreciated, I am losing a lot of time with this bug, because the server keeps getting out of memory due to it.
    Thanks in advance.

  • Vector Average function in T-SQL

    Hi - We need to calculate the Vector Average of the Wind direction based on Wind speed in SQL Server. Normal Average function is not suitable for us.  Has anyone earlier worked similar requirement.  Please let me know how you have solved it.
    thanks

    It's looking like you need to determine the "side" of the circle you need to be on by looking at the difference between your min and your max. If it's over 180 degrees, we need to go the other way. Using that, we can have a case statement make
    the changes needed:
    DECLARE @windDir TABLE (degrees FLOAT, recordedDateTime DATETIME)
    INSERT INTO @windDir (degrees, recordedDateTime) VALUES
    (350, '2015-04-07 08:00:00'),(350, '2015-04-07 08:05:00'),(350, '2015-04-07 08:10:00'),(350, '2015-04-07 08:15:00'),
    (5 , '2015-04-07 08:20:00'),(5 , '2015-04-07 08:25:00'),(350, '2015-04-07 08:30:00'),(5 , '2015-04-07 08:35:00'),
    (5 , '2015-04-07 08:40:00'),(5 , '2015-04-07 08:45:00'),(350, '2015-04-07 08:50:00'),(5 , '2015-04-07 08:55:00'),
    (15 , '2015-04-07 09:00:00'),(15 , '2015-04-07 09:05:00'),(15 , '2015-04-07 09:10:00'),(15 , '2015-04-07 09:15:00'),
    (5 , '2015-04-07 09:20:00'),(5 , '2015-04-07 09:25:00'),(15 , '2015-04-07 09:30:00'),(5 , '2015-04-07 09:35:00'),
    (5 , '2015-04-07 09:40:00'),(5 , '2015-04-07 09:45:00'),(15 , '2015-04-07 09:50:00'),(5 , '2015-04-07 09:55:00')
    SELECT CAST(recordedDateTime AS DATE) AS date, DATEPART(HOUR,recordedDateTime) AS hour, CASE WHEN ABS(MAX(degrees) - MIN(degrees)) > 180 THEN CASE WHEN AVG(CASE WHEN (degrees > 180) THEN degrees-360
    ELSE degrees
    END) < 0 THEN 360+AVG(CASE WHEN (degrees > 180) THEN degrees-360 ELSE degrees END)
    ELSE AVG(CASE WHEN (degrees > 180) THEN degrees-360 ELSE degrees END)
    END
    ELSE AVG(degrees)
    END
    FROM @windDir
    GROUP BY CAST(recordedDateTime AS DATE), DATEPART(HOUR,recordedDateTime)
    In future, when you ask a question, please provide some example DDL, data and an expected output. This will help us to help you. When you provide example data, please do so in a table (as I have done at the top of this example).
    Don't forget to mark helpful posts, and answers. It helps others to find relevant posts to the same question.

  • Report custom function and repository custom function

    Hi Guru:
    We have some repository functions.
    When using them in the report, in design time, we will choose Add to report for the functions and then we could use it.
    Then the repository functions are updated, and I found the report function, which comes from the repository function, is not updated, I need to add the repository function to the report again to update it.
    As we will have more and more reports using the repository function, in the long run, is there a way to automatically update the report function from the repository for all the reports?
    Thanks.
    Eric

    From Crystal's online help:
    Repository objects that are used in a report and are connected to that report's repository can be updated automatically when opening the report in Crystal Reports. This behavior is controlled by an Options setting and is global for all reports.
    Note:    Objects that are used in a report but are disconnected from the repository are not automatically updated when the report is opened.
    To set the update option
    On the File menu, click Options.
    The Options dialog box appears.
    Click the Reporting tab.
    Select the Update Connected Repository Objects on Open check box.
    Click OK.
    If you don't want to use this global option, you can also update a report's repository objects by selecting the Update Repository Objects option on the Open dialog box for an individual report.
    Note:    When you open a report that contains a command that is stored in the repository, and you have specified that you want to Update Connected Repository Objects on Open, only the definition of the command is automatically refreshed; the data that the command returns is not updated until you click the Refresh button in the report.
    HTH,
    Carl

  • Using the Ago Function

    Hi,
    I have a time dimension with levels AllTime, Year, Month, Week, Day. I set the chronological key to the day and created an Ago Measure in my fact. The repository global consistency was successful. However when I used it in answers, I got the following error message:
    State: HY000. Code: 10058. [NQODBC] [SQL_STATE: HY000] [nQSError: 10058] A general error has occurred. [nQSError: 22040] To use AGO function, the storage level of the query ('[DIM_DATE.DIMENSION_KEY]') must be a static level. (HY000)
    SQL Issued: SELECT DIM_DATE.CALENDAR_YEAR_NAME saw_0, F_TEST.MEASURE saw_1, F_TEST.YearAgoMeasures saw_2 FROM WMS ORDER BY saw_0
    Does anyone have any idea please? Note that the DIM_DATE.DIMENSION_KEY is the primary key of the time dimension table.
    Thanks a lot
    Marija

    Hi Wildmight,
    I restarted everything and got the "must be a static level. (HY000)" error fixed. Then I checked the chronological key in the level "year" but it seems not to be working. It's taking a long long time to show the results (I finally cancel it).
    Reviewing the nqquery log file, I don't really get how obi retrieves the todate info, it uses the analytic function: ROW_NUMBER() OVER (partition by....), do you get the same?
    Thanks again.

  • Average function in HFM returning error

    Hi
    I have written the following script in HFM calculate routine for calculation of averages. But it gives me an error.
    Has anyone used this function and can point out the error in this please?
    SUB SUBSaVG
    HS.EXP "A#AverageSales = " &Average ("A#Sales","3")
    END SUB

    As far as I know (still on HFM 4.X!), HFM doesn't have a predefined average function. You will need to define a new function in your rules as shown below. I got this from tech support a while back. The parameters are a little different to what you have in your example so you may have to tweak. Is the "3" in your example the period number?
    Function Average(strPOV,strFreq)
         DIM nPERIOD
         DIM strCUM
         DIM i
         If strFreq="PERIODIC" Then
              If HS.PERIOD.ISFIRST=TRUE Then
                   nPERIOD=1
              Else
                   nPERIOD=2
              End If
         ElseIf strFreq="YTD" Then
              nPERIOD=HS.PERIOD.NUMBER()
         Else
              EXIT FUNCTION 'Nothing to do -
         End If
         For i = 0 To nPERIOD -1
              If i= 0 Then
                   strCUM = strPOV &".W#PERIODIC"
              Else
                   strCUM= strCUM &"+"& strPOV &".W#PERIODIC.P#CUR-"&i
              End If
         Next
         Average = "(("& strCUM &") / "& nPERIOD &")"
    End Function

  • Trouble with the average function.

    I am still having a problem getting my form to calculate an average the way it should.  On one form I did when I set up an formcalc to average ten places and not average any cell that is blank or null I used the [*] and works just fine, but on the next form that I did that only has three rows it includes the null cells even through I used the [*] function.  What am I doing wrong?

    Do you have a dynamic or fixed dimension table?
    Looks like you have a fixed dimension table here...
    Using -> [*] is to specify each instances of that object inside the subform specified... Here if you have more than one PSI into Row5 it would work... But as I understand you have to write only Avg(Row3.PSI, Row4.PSI, Row4.PSI)
    If you have a dynamic table and your row is only named Row1... each instances of the row would be Row1[0], Row1[1], Row1[2]
    So in your Average function you would only write :
    Avg(Row1[*].PSI) and it would return the average of each rows

  • Why can't I get the average function work with empty cells?

    Why can't I get the average function work with empty cells?

    The thing that I am having a problem with is that I made a different form that calculates the average no matter how may of the cells have numbers or not and I didn't use an if function.  I have tried with this other form and and it calulates as if all the cells where being used.  I am using the [*] in both instances but it only works in the one I did earlier.

  • Using iPad mail program I have a draft of an email. I attempted to "cancel" and "delete draft" but it is still on my screen even after shutting down and restarting. How do I exit so that I can use other mail functions?

    Using iPad mail program I have a draft of an email. I have attempted to "cancel" this and "delete draft" but the email stays on my screen. How can I exit this so that I can use other email functions?

    Try closing the Mail app completely and see if it works properly when you re-open the app : from the home screen (i.e. not with the Mail app 'open' on-screen) double-click the home button to bring up the taskbar, then press and hold any of the apps on the taskbar for a couple of seconds or so until they start shaking, then press the '-' in the top left of the Mail app to close it, and touch any part of the screen above the taskbar so as to stop the shaking and close the taskbar.
    If that doesn't work also do a reset : press and hold both the sleep and home buttons for about 10 to 15 seconds (ignore the red slider), after which the Apple logo should appear - you won't lose any content, it's the iPad equivalent of a reboot.

  • Error while generating DDL commands using startSQLRepository for a new Repository

    Hi,
    I am trying to generate DDL Commands using startSQLRepository for my new repository SubashRepository so that I can use them to create new table structure.
    All the repository related changes looks good. i can see my repository in ACC
    When I run the command:
    startSQLRepository -m SupremeATG –repository /com/supreme/SubashRepository /com/supreme/subashRepository.xml -outputSQLFile C:/ATG/ATG9.3/SupremeATG/config/com/supreme/subashRepositoryDDL.txt
    I get following error:
    Table 'SUBASH_MEMBER' in item-descriptor: 'member' does not exist in a table space accessible by the data source.  DatabaseMetaData.getColumns returns no columns
    Note:
    * errors related to definition file were cleared as the same command threw relevant exception while trying to store a array property with out creating a multi table.
    * Now this is the only exception i see
    * Some DDL are getting generated in the output file, but those are related to inventory repository (I am not sure why this is happening as I have specifically gave the path to my definition file).
    Any help in resolving this is highly appreciated.

    Pl post in the ATG forum

  • How to use standard java functions in a XSLT mapping

    Hi All,
    I wish to use a standard java function in a XSLT mapping, The issue is either i am giving incorrect namespace which is used to invoke the function or the signature of the function call is incorrect, I have read all the links in http://help.sap.com, and i know <b> one can enhance a XSLT mapping by writing one's own java code and thereby using java standard functions </b>, but the requirement is such that i need to try and use java standard function in XSLT mapping itself.
    Please refer to the sample code below:
    <?xml version="1.0" encoding="UTF-8"?>
      <xsl:stylesheet version="1.0"  
        xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
        xmlns:javamap="java:java.lang.String">
    <xsl:output method="text"/>
    <xsl:template match="/">
    <xsl:variable name="input" select="Title">
    <xsl:if test="function-available('javamap:toUpperCase')">
    <xsl:value-of select="javamap:toUpperCase($input)"/>
    </xsl:if>
    Author:<xsl:value-of select="Author"/>
    </xsl:template>
    </xsl:stylesheet>
    error encountered is: Illegal number or type of arguments.
    please reply if you have tried a similar scenario in SAP XI.
    Thanks & Regards,
    Varun

    Hi Varun,
        First of all i want to tell you that as per the documentation you can only call the static function inside xslt mapping. Your toUpperCase method is a non static function.
    What i am getting is that you have an element called Author and you want to convert its value into uppercase.
    you can write your own user defined function which is static.
    Signature of your java method :
    public static string toUpperCase(String Author,Map inputparam)
    try this xslt map.
    <?xml version="1.0" encoding="UTF-8"?>
    <xsl:stylesheet version="2.0"
    xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
    xmlns:javamap="java:JavaProgram">
         <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes"/>
         <xsl:param name="Author">
                 <xsl:value-of select="//Author_name"/>
         </xsl:param>
         <xsl:param name="inputparam" />
         <xsl:template match="/">
         <Author>
                 <xsl:if test="function-available('javamap:toUpperCase')">
                  <xsl:value-of select="javamap:toUpperCase($Author,$inputparam)"/>
                 </xsl:if>
         </Author>
         </xsl:template>
    </xsl:stylesheet>
    Hope this will work.
    Thanks and Regards
    Vishal Kumar

  • Derive found flag in SQL with where clause using TABLE(CAST function

    Dear All,
    Stored procedure listEmployees
    ==========================
    CREATE OR REPLACE TYPE STRING_ARRAY AS VARRAY(8000) OF VARCHAR2(15);
    empIdList STRING_ARRAY
    countriesList STRING_ARRAY
    SELECT EMP_ID, EMP_COUNTRY, EMP_NAME, FOUND_FLAG_
    FROM EMPLOYEE WHERE
    EMP_ID IN
    (SELECT * FROM TABLE(CAST(empIdList AS STRING_ARRAY))
    AND EMP_COUNTRY IN
    (SELECT * FROM TABLE(CAST(countriesList AS STRING_ARRAY))
    =================
    I have a stored procedure which lists the employees using above simple query.
    Here I am using table CAST function to find the list of employees in one go
    instead of looping through each and every employee
    Everything fine until requirements forced me to get the FOUND_FLAG as well.
    Now I wanted derive the FOUND_FLAG by using rownum, rowid, decode functions
    but I was not successful
    Can you please suggest if there is any intelligent way to say weather the
    row is found for given parameters in the where clause?
    If not I may have to loop through each set of empIdList, countriesList
    and find the values individually just to set a flag. In this approach I can’t use
    the TABLE CAST function which is efficient I suppose.
    Note that query STRING_ARRAY is an VARRAY. It is very big in size and this procedure
    suppose to handle large sets of data.
    Thanks In advance
    Regards
    Charan
    Edited by: kmcharan on 03-Dec-2009 09:55
    Edited by: kmcharan on 03-Dec-2009 09:55

    If your query returns results, you have found them... so your "FOUND" flag might be a constant,...

Maybe you are looking for