BEx Query: Percent Share based on characteristic

My question is around a query that follows this sort of layout:
Order  |  Doc No.  |  Account  |  Type  |  *Amount*
   1            1          1          A         20
   1            1          2          A         30
   1            2          3          A         40
   2            3          4          A         50
I want to calculate the percent share by Doc No. so in this example, I'd want it to show like this:
Order  |  Doc No.  |  Account  |  Type  |  *Amount*  |  *Percent*
   1            1          1          A          20         40%
   1            1          2          A          30         60%
   1            2          3          A          40        100%
   2            3          4          A          50        100%
I've tried doing a forumla based on amount with Aggregation of summation on Doc No. and that didn't work. I also tried some of the other percent functions but unless the exact doc no. is drilled down on, they show the percent share for the entire report which doesn't work either. Any ideas? I feel like I've done something like this before but can't seem to get it to work! Points to an answer that yields the result I'm looking for!
Thanks!
Edited by: Christopher Deaner on Jan 16, 2012 10:55 PM

Let me see if this example of what I'm seeing makes more sense:
Order  |  Doc No.  |  Account  |  Type  |  *Amount*  |  *abs(Amount)*  |  *Percent*  | Expected Percent
   1            1          1          A          20            20          200%           40%     
   1            1          2          A         -30            30          300%           60%
                                   +Result+     -10           -10
   1            2          3          A          40            40          100%          100%
   2            3          4          A          50            50          100%          100%
The absolute value of the Amount column is calculating the result of the original values (with the original signs). This result is being used in the Percent (%CT) calculation which is causing the calculated percent to be wrong. I tried changing the "Calculate Result as" setting to Summation which corrected the result row (in the above example it would show 50 for the abs(Amount) column) but the %CT calculation is still incorrect.

Similar Messages

  • BEx query problem which based on infoset

    Hi, BW experts,
         Now I created a infoset which connect one ODS and one infoObject, ODS structure:  CIO_CO_Area, 0Company, K1, KF1, K2, KF2 ( KF1 and KF2 are data field to store numeric value)
         InfoObject is 0CO_Area (connect to ODS.CIO_CO_Area)
         I can see the value in listcube as following:
    0CO_Area ,  0Company, K1, KF1, K2, KF2
    0001    ,       0001    ,     A1,  20,    B1,  40
    0001    ,       0001    ,     A2,  40,    B2,  100
        but when I create the BEx query with tabular format, the result show as following,
    0CO_Area ,  0Company, K1, KF1, K2, KF2
    0001    ,       0001    ,     A1,  0,    B1,  0
    0001    ,       0001    ,     A2,  0,    B2,  0
      the key figure can not display properly, anyone can help me out?
    thanks in advance.

    Let me see if this example of what I'm seeing makes more sense:
    Order  |  Doc No.  |  Account  |  Type  |  *Amount*  |  *abs(Amount)*  |  *Percent*  | Expected Percent
       1            1          1          A          20            20          200%           40%     
       1            1          2          A         -30            30          300%           60%
                                       +Result+     -10           -10
       1            2          3          A          40            40          100%          100%
       2            3          4          A          50            50          100%          100%
    The absolute value of the Amount column is calculating the result of the original values (with the original signs). This result is being used in the Percent (%CT) calculation which is causing the calculated percent to be wrong. I tried changing the "Calculate Result as" setting to Summation which corrected the result row (in the above example it would show 50 for the abs(Amount) column) but the %CT calculation is still incorrect.

  • BEx query needs to count unique characteristic values

    Is there any way to build a query using BEx query designer to count the number of unique values of a characteristic.  For instance, my cube has detailed transactions for claim information.  Each claim number can have multiple products.  My query need to show the number of claims that exist for each product.  I don't want the detail of the claim number, just how many claims exist.
    Product          Gross Paid Loss        Claim Count
    Total Auto                $ 43,865.01              ?
    Total Property  $ 4,068,321.57              ?
    Not assigned                19,426

    Hi,
    Creat calculated  keyfigure with data functions Count value and save with technical name.
    Right click on that go to propertes, select count with exception aggregation - Claim Number,
    also use after aggregation and decimal places '0'.
    Regards
    Malyadri

  • Bex Query - Show rows from another characteristic

    Hi Guys,
    I have a problem, I need to create a query to be displayed in Excel that shows accounting informacion by number, like this:
    Account         Balance
    12110201       1 USD
    12110202       1 USD
    12110204       1 USD
    That works so far, the problem is that I need to add 2 more columns and in 1 of the new columns I need to show only some accounts, like this:
    Account          Balance        NewColumn1
    12110201       1 USD      
    12110202       1 USD            Balance of 12110202
    12110204       1 USD
    the other one is more challenging because it need to show informacion from a different account, like this:
    Account          Balance        NewColumn1            NewColumn2
    12110201       1 USD      
    12110202       1 USD           Balance of 12110202
    12110204       1 USD                                           Balance of 2406910000
    the first values came from my accounts tables that contain balance from sub accounts, but the value 2406910000 is in fact a sub account value.
    Can some of you expers can help me on this? Is it possible?
    Please help.

    hmmmm
    let me ask this:
    You have multiprovider A
    in that u have Chars
    Account
    Subaccount
    Source of subaccount
    & Keyfigures
    $ amounts
    okey now, lets say u want to display the data as follow:
    $amount-----newcolumn1
    Account----
    2244--$2200--
    2245--$3200--
    bal. of 1234
    2246--$4200--
    2247--$1200-----bal. of 734
    is that what u are asking to display....
    if yes, bring Account in Rows
    bring $amount in Collumns
    add new selection1, in that add $amounts, then add Subaccounts from characteristics
    that way it will show $ for subaccount
    for e.g. in above case it will show $value for 1234 which is subaccount of 2245.
    My question is when you say "Balance of 22140000" what is that you intend to display here....you want to show $ of Balance i.e $45, $56 etc, or
    do you want to show Subaccount Number i.e 1234 or
    do u want to show specific texts "Balance of 22140000"
    my response above was related to this only, what is that you want to show in ur reports?
    what is available in ur multiprovider?
    if you wanna show specific texts  "Balance of 22140000", this cannot be done because you cannot just create texts in Query designers.
    If you wanna show specific $ amounts for that subaccount, answer is create restricted keyfigure
    if you wanna show Subaccount Number i.e 1234 etc, that means  you will have to create Replacement path variable and then replace values of Subaccount number into that column.
    Maybe you will not need cell definition then.
    i hope you understand what i am trying to explain..
    dont hesitate to reply with detailed explaination, and any questions.

  • Problem with Queries Structures in Bex Query Designer and Universe Designer

    Hi everyone,
    I have a problem when i try to do a Universe from a Bex Query Designer.
    When I use a Characteristic Restrictions in a Structure, the universe only show me the structure without the objects inside it.
    EJ:
    1) Bex Query Designer
    Colunms
    (Structure) ZSRT_123
                          - (Characteristic Restrictions) Reg Guayana
    >          (InfoObject)     0Product = 'XXX'
    >          (InfoObject)     0Country = 'YYY'
         - (Characteristic Restrictions) Reg Caracas
    >          (InfoObject)     0Product = 'AAA'
    >          (InfoObject)     0Country = 'BBB'
    Rows
    (Structure) ZSRT_456
                   (Key Figure)     Net Sales
    2) Universe designer
    (Class) ZSRT_456
    >(Measure)      Net Sale
    (Class)     ZSRT_123
    >(Dimension)      ZSRT_123
    The universe dont translate the two Characteristic Restrictions in the structure ZSRT_123.
    Any information would be much appreciated. Thank you.

    Hi,
    I assume that you are using BOE XI 3.1 SP2.
    We have added an option in SP2 to generate or not the L00 level.
    Unfortunately this option applies not only on characteristics but also on hierarchies, hierarchies variables and structures: that's the reason why you have no elements belonging to the structure generated.
    I recommend to always generate L00 in order to have your structure generated correctly.
    This issue will be fixed in SP3.
    Regards,
    Didier

  • BEX query runs using parameters entered by user in an Excel spreadsheet

    I'm trying to write a macro to automate certain functions for our users.</br>
    </br>
    Essentially, the users would enter numbers (relating to clients) in column A and e-mail adresses in column B.  A set of reports would run based on the first number entered, then the workbook would be saved and e-mailed to the first address in column B.  This would be repeated for the 2nd number/address and so on...  All Bex reports are in the same workbook.  At this point, I'm having a lot of problems finding code that will fill in the Bex query parameters automatically based on inputs in the spreadsheet.  Here is what I've worked up so far for the macro:</br>
    </br>
    Option Explicit</br>
    </br>
    'Macro step 1 u2013 run workbook for client number input and continue</br>
    'EXAMPLE u2013 cell A3 = 1008, cell A4 = 1240</br>
    'All BW queries should run based on the input given in column A (beginning wth A3).</br>
    </br>
    </br>
    'Macro step 2 u2013 create directory for the new files and save the first file</br>
    '     This step will allow the user to save the new files in a new folder in an existing directory, or even to create a new directory:</br>
    </br>
    Function GetFolderPath() As String</br>
        Dim oShell As Object</br>
        Set oShell = CreateObject("Shell.Application"). _</br>
        BrowseForFolder(0, "Please select folder", 0, "c:
    ")</br>
        If Not oShell Is Nothing Then</br>
            GetFolderPath = oShell.Items.Item.Path</br>
        Else</br>
            GetFolderPath = vbNullString</br>
        End If</br>
        Set oShell = Nothing</br>
    End Function</br>
    </br>
    Sub Testxl()</br>
        Dim FName As String</br>
        Dim WbName As String</br>
        Dim Search As String</br>
        Dim Prompt As String</br>
        Dim Title As String</br>
        Dim MyDir1 As String</br>
        Dim MyDir2 As String</br>
        Dim Passed As Long</br>
         </br>
    On Error GoTo Err:</br>
         </br>
        FName = GetFolderPath</br>
        If FName <> vbNullString Then</br>
            Prompt = "Please Select a FileName"</br>
            Title = "Name"</br>
            Search = InputBox(Prompt, Title)</br>
            If Search = "" Then Exit Sub</br>
        End If</br>
        FName = FName & "\" & Search</br>
        MkDir FName</br>
        ActiveWorkbook.SaveAs FName & "\" & Search & ".xls"</br>
         </br>
         'Test for existence of new folders.files</br>
        Passed = 1</br>
        GetAttr (FName)</br>
        Passed = 2</br>
        GetAttr (FName & "\" & Search & ".xls")</br>
        Passed = 3</br>
        GetAttr (ActiveWorkbook.Path & MyDir1)</br>
        Passed = 4</br>
        GetAttr (ActiveWorkbook.Path & MyDir2)</br>
    </br>
        End</br>
         'Sheets("Sheet1").Range("B1").Value = Search **Add if you require the name to be recorded in your spreadsheet</br>
    Err:</br>
        Select Case Err</br>
        Case 53:           MsgBox "File/Folder not created. Failed at step " & Passed</br>
        Case 75:    MsgBox "Folder already exists"</br>
        End Select</br>
    End Sub</br>
    </br>
    'Macro step 3 u2013 save workbook</br>
    ActiveWorkbook.Save</br>
    </br>
    'Macro step 4 u2013 e-mail workbook</br>
    'EXAMPLE u2013 cell B3 = amay@email, cell B4 = bmay@email</br>
    'The workbook should e-mail based on the input given in column B (beginning wth B3).</br>
    wb.SendMail  u201Ccell B3u201D</br>
    </br>
    'Macro step 5 u2013repeat until no inputs remain</br>
    'EXAMPLE u2013 cell A3 = 1008, cell A4 = 1240</br>
    'Steps 1-4 should repeat for cell A4, then A5 (if necessary) and so on until no more inputs remain.  </br>
    </br>
    </br>
    If anyone has any advice I'd love to try it out.</br>
    </br>
    Thank you for your time.</br>
    Andy
    Edited by: AndyMay on Jul 14, 2009 5:08 PM - I inserted html breaks

    Option Explicit</br>
    </br>
    Sub KeyClient()</br>
    </br>
    'Macro step 1 - filter workbook for client number input and continue</br>
    'EXAMPLE - cell B3 = 1008, cell B4 = 2048</br>
    'All BW queries should run based on the input given in column B (beginning wth B3).</br>
    </br>
    'define x and begin loop</br>
    Dim i, x As Integer</br>
    Dim curCell As Range</br>
        For x = 3 To 22</br>
        Set curCell = Worksheets("Input").Cells(x, 2)</br>
    </br>
    'stop BW from refreshing until we are finished</br>
        Run "SAPBEX.XLA!SAPBEXPauseOn"</br>
        Run "SAPBEx.XLA!SAPBEXsetFilterValue", curCell, "", Sheets("Client Contribution").Range("C9")</br>
    'BW resumes refreshing</br>
        Run "SAPBEX.XLA!SAPBEXPauseOff"</br>

  • Xcelsius based on BEx query. Issue when transporting from DEV to PRD

    Hi all,
    I am facing an issue as described below:
    I created dashboard based on bex query in Query Browser. Everything is working find in DEV. Then I transport the dashboards to PRD, I also use the override settings to point from BOD-BWD to BOP-BWP, my connection changed accordingly. Everything seems ok. One day when we stop the BOD system. Dashboards in BOP are not working. Then I start BOD, everything is ok then.
    The issue I got:
    Internal: BOP....
    External: BOD.../XcelsiusWebServices.
    Is there any chance that dashboard in BOP using the BOD xcelsius web service?
    I have resolved this issue by:
    - Open the dashboard in BOP, then in each of the query in Query Browser, I clicked edit and click next, next until end.
    - Then re-save to BOP, then it is working
    For your information, I used BEx query in Query Browser only, not use BIWS.
    Dashboard 4.0 SP04
    BW 7.3
    Does anyone face this issue before? And how you resolved it? Please kindly share with me.
    Thanks,
    Quan Vo.

    Hi Quan,
    Found few points regarding this.Please check might help you.
    Migration of Dashboards (using Query Panel) on BI 4.0 environment - Business Intelligence (BusinessObjects) - SCN Wiki
    Regards,
    Javed

  • Dynamic filter on time characteristics on OLAP SAP BEX query based universe

    Dear all,
    I'm currently working on the integration between SAP NetWeaver BI 7.0 and SAP BusinessObjects XI 3.1 FP 1.5 via integration kit.
    I've built an OLAP universe on the top of a BW query based on a multiprovider that contains 10 infocubes.
    Everything works fine but I need to create a filter in the OLAP universe that allows to restrict data by current date (e.g. using TIME characteristic of Infocube such as 0CALDAY or 0CALMONTH). From that filter we could start creating other conditions to compare data to different time periods.
    I've already tried to use a SAP exit variable in  a BW query but this kind of object would restrict query data only by current date and for example it would be impossible to browse data by previous years (to bypass this problem we could use restricted key figures with different offsets but we have too many key figures in the query and the number of restrictions
    would rise exponentially). 
    In a relational DataBase we can do that using a "where condition" based on 'CURRENTDATE' (SQL DB2 syntax).
    Now, we need to apply the same logic but translated in MDX syntax. 
    Is it possible to enter a dynamic filter in the OLAP universe or just fixed or promt values ?
    Any advise?
    Thanks in advance.
    Best Regards.
    M.

    Hi Ingo,
    1) My question is: "How can I have to manage variable in BEX queries and in the UNIVERSE in order to obtain the maximum flexibility to create reports with measures on actual day (for example) without asking the user to promt a value ?"
    I want to use an unique BEX query to define an unique UNIVERSE. On this UNIVERSE I want to create many reports (actual day, previous day, and so on).
    If I restrict 0CALDAY with an EXIT variable then shall I be able to create a different restrictions on the same Universe based on 0CALDAY ?
    2) Another question is:
    Is it possible to insert an XML / MDX filter on the OLAP Universe with dynamic derivation of the system date ?
    For example:
    Instead of this:
    <FILTER KEY="[0FISCYEAR].[LEVEL01].[NAME]">
        <CONDITION OPERATORCONDITION="Equal">
            <CONSTANT CAPTION="Z12008"></CONSTANT>
        </CONDITION>
    </FILTER>
    Is it possible to insert a tag with a dynamic function to derive the system date ?
    Thanks in advance.
    Best Regards.

  • Results based on From and To value in Bex query designer.

    Dear all,
    We are using BI7.00. In one of our report which pertains to PM user wants to get the details of number of breakdowns which falls in the value range 0 to 1 hours.
    I created a condition which has 2 variables, one is From value and the other is for the To value (since user wants to enter both the limits). I have written a condition that if the breakdown hour is greater than or equal to variable1 and less than or equal to variable2.
    Using the above condition if the query is run, i am not getting the desired output. The values avaialble in the report are 0.65,0.78,1.30,7.38,0 etc., when i give 0 to 1 i should get the values 0.65,0.78 and 0 but instead report displays "No valid results".
    I changed the condition and selected "Between" variable 1 and variable 2 - yet no change in the query.
    To my knowledge i foresee that system is not able to recognize the decimal and hence provides details only based on the whole numbers.
    How to get my requirement achieved in the Bex query designer.
    Experts suggestion with steps will be very useful to solve my problem.
    Regards,
    M.M
    Edited by: Magesh Magesh on Dec 26, 2008 11:28 AM

    Hi Magesh,
    I think you could try one more way.
    Create a formula inserting your two formula variables for limits .(FV -  are ready for input ) .
    The formula would return the result as 1 or 0 because it would have boolean condition in it.
    You could then place a condition in the query designer to only show all records where the value of the formula key fig is 1.
    You formula A would look like
    ( KF > FV1) AND (KF < FV2) * 1.
    And in the condition put A EQ 1.
    You could scale the key figures as well and multiply the limits mentioned by the users in FV1 and FV2 if decimals are still not recognized by SAP.(scaling)
    Regards,
    Sunmit.

  • BEx query based on virtual cube donu00B4t display a valid List of Value (LOV)

    Hello
    I have a problem with an invalid LOV. The scenario is the following; There´s a BEx query based on a virtual cube. The query has an exit variable on caracteristic that is based on 0CALMONTH.
    At Universe Designer I simply create a connection, a universe based on this query and export.
    At Web Intelligence (also at Live Office), when I try to execute de query, the prompt to fill my exit variable display a list of value that doesn´t match with the values of the caracteristic at the cube.
    Actually, the list at the prompt starts with 01.0000 and finishes with 05.0968.
    In Universe Designer, the option to edit the list of values is not available. But I think that editing the LOV is not the correct way.
    I´ve tried creating a new query based on the DSO that is the source of the virtual cube. In this case, I had a valid list. Unfortunately, I can´t use this DSO.
    Did anyone already have this problem?

    Hi James,
    can you explain what you mean with "input length for that filed" ?
    The field in the table is varchar2(120). I coudn't found options for the List of value.
    Thanks for your response
    Carsten
    null

  • WebI report based on BEx query in Live Office document

    Hi
    We have a BEx query in BW that has one input ready variable (period). Then we have created a WebI report based on this BEx query (the WebI report itself does not have any prompts). When we run the WebI report we get asked to enter a value in the BEx variable (remember: this is not a WebI prompt). Until this stage everything works fine. Then we have created a Live Office document and added the WebI report. When we refresh the Live Office document, the BEX variable is not shown. The data that is retrieved is from the last time the WebI report run. The refresh option is set to u201COn demand: From the databaseu201D.
    Is there a way to get the BEx variables to be shown when refreshing the Live Office document? Remember, we do not use WebI prompts.
    We use BW 7.3 and BO BI 4.0.
    Kind regards
    Erik

    Hi,
    Unfortunately, this feature has not been developped the BICS connectiviy. It is only available for manda
    tory prompts based on universe. Others have noted the same problem, so there is an enhancement request for the feature to be available using BICS connection in the "Ideas Place".
    Use the link to vote for the idea, more votes gives a better chance that this will be picked up for development.
    [LifeOffice idea|https://cw.sdn.sap.com/cw/ideas/4094]
    Thanks,
    Marianne

  • How to bulid a Crystal report based on Bex query as source

    Hi,
    I have requirment where the end user wants the query in Crystal.I built a Bex query in Bex query designer.I would like to know how to create crystal report based onthe Bex query.
    Thanks,

    Hi
    The Crystal Reports are integrated with BW such that the query built in BW can be used to bulit Crystal Reports on them.
    After launching the Crystal Reports, you will have and option : "Open reprt from BW" whcih will help you in opening the BW Queries and create Crystal Reports.
    Also in the Menu there is an optin SAP-->Create New Report from a Query
    Regards, Hyma
    Edited by: Hymavathi Yanamadala on Aug 13, 2009 5:52 AM

  • RWI 00200 Error while scheduling the Bex Query based Webi report

    Dear All,
    I am facing the below error while scheduling the Bex Query based Webi report.
    Error:RWI 00200
    We are using BO XI 4.0 Sp05.
    Please advise

    Hi,
    I am on BO 4.0 SP05 Patch 6. Webi reports are just showing processing but not giving results. When I try to create new report it is throwing java security error.
    Tried applet patch upgrade(From link : https://websmp207.sap-ag.de/~sapidb/011000358700000902752013E) for webi certificate but didn't help.
    Please suggest what could be done.
    Thanks and Regards,
    Ankit Sharma

  • Can not create Webi report on a Universe based on Bex Query

    Hi,
    We are using BO XI 3.1 (FP 3.4) with SAP integration Kit (same Patch Level) with SAP Authentication. We have a Universe based on a bex query and its connection is set to use SSO.
    We have say two SAP users U1 & U2. Now "U1" is able to create webi reports but when we Logged in as "U2" and try to create Webi reports or try to refresh reports created by U1 it through an error ...
    The database error text is: (CS) "Error on NumResultCols" . (WIS 10901).....
    As per the "Authorization" section in BusinessObjects XI Integration for SAP Solution Installation Guide we have provided this users with all the mention autherizations.
    Any words over this will be highly appreciated.
    Regards,

    It is highly probable that this is due to missing authorizations on the SAP BW side (not talking about the authroizations which are directly related to the BO/BW integration). I would recommend to ask your SAP Basis team to do a security trace while you are accessing the reports with the user, who gets the error. THey should look for failing authorization checks.
    Regards,
    Stratos

  • OLAP Universes - Based on BEx Query - Month and Previous Month Functions

    Hi,
      I created a Universe based on SAP BEx queries and I like to create a filter so that I use in Web Intelligence report to run for "Previous Month" data always. There are "Date" filelds in BEx Query(No Month info only date data). I have no knowledge of SAP BEx Queries and new to OLAP universes. Could you help.
    How to create filter that show Previous Month.
    Nanda Kishore
    Edited by: Nanda Kishore B on Dec 26, 2010 6:15 AM

    The easiest way  (but NOT the most efficient one) is to create a local variable (Dimension) in your report with the following code:
    =if (Month(CurrentDate())=1 AND Month([[MyDate]])=12 AND Year([[MyDate]])=(Year(CurrentDate())-1)) OR (Month(CurrentDate())>1 AND   Month([[MyDate]])=(Month(CurrentDate())-1)) then 1 else 0
    where MyDate is the field from your query containing the data information
    Activate the report filter area in your report design panel by pressing the Report filter icon and drag and drop your variable there and apply it to the entire report. Filter value 1 and you will get the data for the previous month.
    Keep in mind that this approach is not optimal especially if you do have many rows of data delivered to your WebI report because filtering takes place only AFTER the data is retrieved. The Best practice here is to work with BEx variables.
    How many rows of data does your WebI report normally fetches?
    Regards,
    Stratos

Maybe you are looking for

  • Custom Game Menu in j2me

    Hello everyone, I'm a newbie at J2ME and I am trying to create a mobile game. I've been reading on some tutorials and books on J2ME programming, and I've noticed that they create simple menus ( the menu examples they have are pretty simple, doesn't h

  • How to get iDVD on new Mac.

    Just bought a new Macbook air 11" running on Os X 10.7.2 and a superdrive so i could burn DVD's.... but no iDVD! I have it now and it works perfectly....after a little research. This is where i started, very helpful: http://www.youtube.com/watch?v=my

  • BEX error (HP CP1025nw)

    Hi, The printer icon in the system tray HP1025nw BEX error message and it does not work. (The system I use windows 7-32-bit.) Can you help?

  • JRockit 5.0 P26.4.1?

    Hello, I see an enhanced pre-release version of JRockit mentioned in the results of several benchmarks as BEA JRockit(R) 5.0 P26.4.1 (build P26.4.1-5-64782-1.5.0_06-20060726-0014-win-x86_64). The date appears to be 7-26-2006. I am trying to maximize

  • Export - import / very urgent

    I need to import data from 9.2.0.3.0 to 8.1.7 How can I do that. Thanks a lot