Displaying only one value for a key figure

Hi guys,
I am building a query in BEx Analyzer (v 3.5) where I am facing a difficult requirement.
In the cube I have the following structure:
Bank Account | Date | (.....) | KF: Amount | KF:Closing Balance
A                   | 29.10.2008  | 300             |  5000
A                   | 29.10.2008  | 100             |  5000
A                   | 29.10.2008  | 600             |  5000
As you can see there is one entry for every movement on the account for each day, while the closing balance is the same and entered for each record.
It is not an option to change this logic in the source system.
The problem is that I don't have any differentiating characteristics that is useful for the query and I only want to display the closing balance once (i.e. 5000). Now I am getting 15000.
Is there any way to do this without adding new characteristics?
Will appreciate all ideas!
Br,
TM

Hi TM,
Did you try with the aggregation: Set this to Maximum in stead of Sum.
Success,
Udo

Similar Messages

  • Display only one row for distinct columns and with multiple rows their valu

    Hi,
    I have a table having some similar rows for some columns and multiple different rows for some other columns
    i.e
    o_mobile_no o_doc_date o_status d_mobile_no d_doc_date d_status
    9825000111 01-jan-06 'a' 980515464 01-feb-06 c
    9825000111 01-jan-06 'a' 991543154 02-feb-06 d
    9825000111 01-jan-06 'a' 154845545 10-mar-06 a
    What i want is to display only one row for above distinct row along with multiple non distinct colums
    ie
    o_mobile_no o_doc_date o_status d_mobile_no d_doc_date d_status
    9825000111 01-jan-06 'a' 980515464 01-feb-06 c
    991543154 02-feb-06 d
    154845545 10-mar-06 a
    regards,
    Kumar

    Re: SQL Help

  • DB_GET_BOTH_RANGE fails when there is only one record for a key

    Using the DB_GET_BOTH_RANGE flag doesn't seem to work when there is a
    single record for a key.
    Here's a sample Python program that illustrates the problem. If you
    don't know Python, then consider this to be pseudo code. :)
    from bsddb3 import db
    import os
    env = db.DBEnv()
    os.mkdir('t')
    env.open('t',
    db.DB_INIT_LOCK | db.DB_INIT_LOG | db.DB_INIT_MPOOL |
    db.DB_INIT_TXN | db.DB_RECOVER | db.DB_THREAD |
    db.DB_CREATE | db.DB_AUTO_COMMIT)
    data = db.DB(env)
    data.set_flags(db.DB_DUPSORT)
    data.open('data', dbtype=db.DB_HASH,
    flags=(db.DB_CREATE | db.DB_THREAD | db.DB_AUTO_COMMIT |
    db.DB_MULTIVERSION),
    txn = env.txn_begin()
    #data.put('0', '6ob 0 rev 6', txn)
    data.put('0', '7ob 0 rev 7', txn)
    #data.put('0', '8ob 0 rev 8', txn)
    data.put('1', '9ob 1 rev 9', txn)
    txn.commit()
    cursor = data.cursor()
    print cursor.get('0', '7', flags=db.DB_GET_BOTH_RANGE)
    cursor.close()
    data.close()
    env.close()
    This prints None, indicating that the record who's key is '0' and
    who's data begins with '7' couldn't be found. If I uncomment wither of
    the commented out puts, so that there is more than one record for the
    key, then the get with DB_GET_BOTH_RANGE works.
    Is this expected behavior? or a bug?

    You can use the DB_SET flag which will look for an exact key match. If
    you use it with the DB_MULTIPLE_KEY flag, it will return multiple keys
    after the point it gets a match. If you can post here how all your
    LIKE QUERIES look, I may be able to provide you with the suited
    combination of the flags you can use for them.I'm not doing like queries. I'm using BDB as a back end for an object
    database. In the object database, I keep multiple versions of object
    records tagged by timestamp. The most common query is to get the
    current (most recent version) for an object, but sometimes I want the
    version for a specific timestamp or the latest version before some
    timestamp.
    I'm leveraging duplicate keys to implement a nested mapping:
    {oid -> {timestamp -> data}}
    I'm using a hash access method for mapping object ids to a collection
    of time stamps and data. The mapping of timestamps to data is
    implemented as duplicate records for the oid key, where each record is
    an 8-byte inverse timestamp concatenated with the data. The inverse
    timestamps are constructed in such a way that they sort
    lexicographically in inverse chronological order. So there are
    basically 3 kinds of query:
    A. Get the most recent data for an object id.
    B. Get the data for an object id and timestamp.
    C. Get the most recent data for an object id who's timestamp is before
    a given timestamp.
    For query A, I can use DB->get.
    For query B, I want to do a prefix match on the values. This can be
    thought of as a like query: "like <inverse-time-stamp>%", but it can
    also be modelled as a range search: "get the smallest record that is >=
    a given inverse time stamp". Of course, after such a range search,
    I'd have to check whether the inverse time stamp matches.
    For query C, I really want to do a range search on the inverse time
    stamp prefixes. This cannot be modelled as a like query.
    I could model this instead as {oid+timestamp -> data}, but then I'd
    have to use the btree access method, and I don't expect that to scale
    as I'll have hundreds of millions of objects.
    We tried using BDB as a back end for our database (ZODB) several years
    ago and it didn't scale well. I think there were 2 reasons for
    this. First, we used the btree access method for all of our
    databases. Second, we used too many tables. This time, I'm hoping that
    the hash access method and a leaner design will provide better
    scalability. We'll see. :)
    If you want to start
    on a key partial match you should use the DB_SET_RANGE flag instead of
    the DB_SET flag.I don't want to do a key partial match.
    Indeed, with DB_GET_BOTH_RANGE you can do partial
    matches in the duplicate data set and this should be used only if you
    look for duplicate data sets.I can't know ahead of time whether there will be duplicates for an
    object. So, that means I have to potentially do the query 2 ways,
    which is quite inconvenient.
    As you saw, the flags you can use with cursor.get are described in
    detailed here.But it wasn't at all clear from the documentation that
    DB_GET_BOTH_RANGE wouldn't work unless there were duplicates. As I
    mentioned earlier, I think if this was documented more clearly and
    especially of there was an example of how one would work around the
    behavior, someone would figure out that behavior wasn't very useful.
    What you should know is that the usual piece of
    information after which the flags are accessing the records, is the
    key. What I advice you is to look over Secondary indexes and Foreign
    key indexes, as you may need them in implementing your queries.I don't see how secondary indexes help in this situation.
    BDB is
    used as the storage engine underneath RDBMS. In fact, BDB was the
    first "generic data storage library" implemented underneath MySQL. As
    such, BDB has API calls and access methods that can support any RDBMS
    query. However, since BDB is just a storage engine, your application
    has to provide the code that accesses the data store with an
    appropriate sequence of steps that will implement the behavior that
    you want.Yup.
    Sometimes you may find it unsatisfying, but it may be more
    efficient than you think.Sure, I just think the notion that DB_GET_BOTH_RANGE should fail if
    the number of records for a key is 1 is rather silly. It's hard for me
    to imagine that it would be less efficient to handle the non duplicate
    case. It is certainly less efficient to handle this at the application
    level, as I'm likely to have to implement this with multiple database
    queries. Hopefully, BDB's cache will mitigate this.
    Thanks again for digging into this.
    Jim

  • How can I display only one value of a field with two or more values?

    Post Author: skiabox
    CA Forum: Crystal Reports
    I have a field in my report with 2 or more values (depending of another field id).For example for id = 1 the report gives me 2 names in that field.For id = 3 the report gives me 3 names in that field.I want to display only one of these names in the id row.The selection of name is random.Thanks!

    Hello Tim,  would barely fit in this situation since this code resides on the client’s interaction side of things. I’d recommend using JavaScript for this matter, e.g. var Data_FName1 = document.getElementById(‘Data_FName1’).value;. If you still opt for using CFML, then you’d go for proxying your JavaScript code to a CFC.

  • Display only positive values for a particular Keyfigure

    Hi..
    (Sorry, I accidentally posted this also in Datawarehousing forum, actually it related to BeX forum).
    For a particular column(keyfigure) in my report, the user wants to display only positive values.
    I used the formula from the one of the forums
    (Keyfig > 0)* Keyfig.
    This displays only positive values in the column as required. But, the result for this column is also affected. As the result is negative, it shows, zero in the result for this column.
    Is there a way in which the result will not be affected by the formula?
    I went into the properties of the particular keyfigure and chose Calculate Result as -> Summation.
    It throws out the following error message
    'Calculating result as...' was not executed
    Message no. BRAIN141
    Diagnosis
    The function 'Calculate Results as ...' could not be used in all
    instances.
    The recalculation of a result cell always occurs based on the set of
    detailed cells subordinated to this cell. This is the most detailed
    level of the drilldown. Therefore it is not posible to recalculate in
    hierarchical lists. The calculation of a results cell is not performed
    if a cell or column with an expand symbol is assigned beneath it.
    Otherwise the newly calculated result is changed every time one of its
    lower-level nodes is expanded. This is not supported for technical
    reasons and would also only confuse users.
    Note, however, that calculating with "Suppress Results" is always
    executed because the restriction described above does not apply in this
    case.
    NOTE:
    The query shows the keyfigure values for a selected title, for profit center and territory hierarchies.
    Any suggestions would be greatly appreciated.
    Thanks,
    Sai.

    Hi Deepu,
    Thanks for the reply. I tried with ur formula.
    LEAF(keyfig) gives all values "zero" for that particular column including the result.
    NOT LEAF(keyfig) gives all values "one" for that particular column including the result.
    So, ur formula gives the same values as of the present column values.
    I tried condition, but it's not working...it says the following errors...
    There is a condit. on Title, results row suppress. active on Profit Center    
    (conditional                                                                               
    Message no. BRAIN144                                                                               
    Diagnosis                                                                               
    Characteristic Title has an output condition and the 'Suppress Results    
        Cells' property is active for Profit Center. This generally leads to an   
        incomprehensible output list.                                                                               
    System response                                                                               
    As soon as an output condition is defined for a characteristic (here      
        Title), the system calculates the corresponding result cells and applies  
        the output condition. If a result cell of this type is later deleted by   
        the condition, all the lower-level detail and result cells in its         
        drilldown are suppressed. Because the result cell is suppressed the       
        Title rows are then omitted from Profit Center.                                                                               
    In extreme cases this can lead to an entirely empty list being            
         displayed, although the single rows or columns would be displayed if the  
         condition were deactivated.                                                                               
    Procedure                                                                               
    Check the query settings, especially results row suppression and the      
         output conditions.                                                                               
    Procedure for System Administration                                                                               
    You can deactivate this message Brain 144 with transaction RSRT1.                                                                               
    There is a condit. on Profit Center, results row suppress. active on        
    Territory as in SPL (conditional                                                                               
    Message no. BRAIN144                                                                               
    Diagnosis                                                                               
    Characteristic Profit Center has an output condition and the 'Suppress  
        Results Cells' property is active for Territory as in SPL. This         
        generally leads to an incomprehensible output list.                                                                               
    System response                                                                               
    As soon as an output condition is defined for a characteristic (here    
        Profit Center), the system calculates the corresponding result cells and
        applies the output condition. If a result cell of this type is later    
        deleted by the condition, all the lower-level detail and result cells in
        its drilldown are suppressed. Because the result cell is suppressed the 
        Profit Center rows are then omitted from Territory as in SPL.                                                                               
    In extreme cases this can lead to an entirely empty list being            
         displayed, although the single rows or columns would be displayed if the  
         condition were deactivated.                                                                               
    Procedure                                                                               
    Check the query settings, especially results row suppression and the      
         output conditions.                                                                               
    Procedure for System Administration                                                                               
    You can deactivate this message Brain 144 with transaction RSRT1.
    Thank you very much.
    Regards,
    Sai.

  • Planning book values for certain key figures show doubled up numbers

    currently on SCM 7.0, we are facing a strange intermittent issue of doubled up values in planning book for certain key figures when compared to the underlying Infocube.
    This happens when the Input process step happens, some times when the process step fails in chain and is run again.
    After its run then we load data to the planning book , then when the key figures show up for the current week bucket they show Doubled up values
    We tried to run a consistency check /SAPAPO/OM17 (DP time series option) but no result.
    Can anyone mention what could be the reason ?

    Hi,
    Please check the data in the cube for the codes . There could be double request for the same keyfigure. When you copy from cube whatever value avilable in the cube gets into Planning book.
    Transaction : LISTCUBE
    Solution : Delete the old request and check the value agina in cube. Execute the TSCUBE.
    Thanks,
    Jeysraj

  • 3 Decimal place values for Amount Key Figure

    Hi Experts,
    I have created an ODS in BI 7.0. This has a amount key figure which is getting calculated by a routine. Now The value that is getting calculated is getting stored into the ODS with only two decimal places.
    For example if the value that is gettig calculates is 0.187 by the code, the values that is getting stored is 0.19.
    This is not related to Bex display. We need to store the values 0.187 in the system and not 0.19.
    The Amount key figure that we are using is of unit 0DOC_CURRENCY . In Additional properties,  'key figure with maximum precision' check box is ticked is . We have not defined any decimal places for the BEX Display.
    Kindly help us in this matter.

    Hi Saurabh,
                  If you wish to change the decimal precision for your 0DOC_CURRENCY... you can use t.code CUNI to change the number of decimal places.  But, then this would be global effect wherein whereever this infoobject is used it would be reflected with the changes you made in CUNI.  Also check if you have authorization to change this. 
    Regards,
    Kishore

  • Multi Language- Picklist fields are displayed only one language for Reports

    Hi!
    I am working on Siebel On Demand with Multi Language (English and Spanish) and it works well for web interface, the automatic translation for picklist works properly.
    However when I create any report (with any Record Type) the fields setup with picklist are displayed only in spanish language even though I am on English mode.
    Have you any reference(s) or previous experience(s) on that?
    Thanks in advance
    Mtb

    Hi,
    in reports the language of the picklists corresponds always to the company default language.
    The only solution I now (its really static and not so nice):
    Create one report per language and change the picklist field by using CASE statements...you see its hard to refresh if you have lots of values :)
    cheers
    Myriam

  • Set default Value for a key figure

    Hi Experts,
    I need to enter a set o value for some char in a layout but for this set is not relevance a keyfigure. I know that there needs to be a keyfigure in the layout for the data to be saved to the transactional cube.
    So is there a way to write a default value to the keyfigure without the user having to enter the keyfigure in the layout?
    Any help will be rewarded.
    Many thanks,
    Fabio

    I gave an example of = 0.
    In youe case, if the default value is other than zero,
    then:
    = value.
    Ravi Thotahdri
    Pl let me know what fox code do you have.

  • How to show filter values of restricted key figures in BEx Analyzer?

    Hi,
    I have following report.
                         Quantity USA        Quantity China
    Product           100                        150
    Quantity USA is a restricted key figure using key figure 'quantity' and a restriction on characteristic 'country' = USA
    Quantity China is a restricted key figure using key figure 'quantity' and a restriction on characteristic 'country' = China
    I notice that when I put only one of these resticted key figures into the query, there is a line in the filter area of the report in the BEx Analyzer that shows the characteristic 'country' and the value on which it's restricted in the restricted key figures.
    E.g.:
    Country          USA
                         Quantity USA
    Product           100 
    If I put both restricted key figures in the query, this line is not shown.
    Does anyone of you know how I can display this line again when using multiple restricted key figures like this in the query?
    Thanks!
    Regards,
    Pascal

    Hi,
    I have following report.
                         Quantity USA        Quantity China
    Product           100                        150
    Quantity USA is a restricted key figure using key figure 'quantity' and a restriction on characteristic 'country' = USA
    Quantity China is a restricted key figure using key figure 'quantity' and a restriction on characteristic 'country' = China
    I notice that when I put only one of these resticted key figures into the query, there is a line in the filter area of the report in the BEx Analyzer that shows the characteristic 'country' and the value on which it's restricted in the restricted key figures.
    E.g.:
    Country          USA
                         Quantity USA
    Product           100 
    If I put both restricted key figures in the query, this line is not shown.
    Does anyone of you know how I can display this line again when using multiple restricted key figures like this in the query?
    Thanks!
    Regards,
    Pascal

  • Setting the values of the key figures

    Hi,
    I have a problem in a query. There is a variable chosen with a range for 0calmonth. For the two of the key figures, I need to restrict the key figure to the first period and for the other key figure I need to restrict to the last period. However, what I need more is that if in the restricted period there is no value for that key figure it should get the first period that it has a value. For example:
    Our variable set as: 02.2006   -  05.2006
    And our data is
         CalMonth          KeyFig1     KeyFig2
    A     02.2006                 0            7
    A     03.2006                 0           8
    A     04.2006                 4            9
    A     05.2006                  5            0
    I want to see in the query as:
                  KeyFig1    KeyFig2
    A              4                9             
    When I add the results with first value and last value, I can see these figures in the general results section. But this time I have to hide the key figures and show only the results section.
    Any idea on preparing such a query?
    Thanks in advance...

    Hi,
    try using conditions:
    http://help.sap.com/saphelp_nw70/helpdata/en/43/2695d2fd2f0d23e10000000a1553f7/content.htm
    http://help.sap.com/saphelp_nw70/helpdata/en/43/b57138c1afbd20e10000009b38f889/content.htm

  • How to display only Negative values in the report.....

    Hi,
    I want to display only negative values for one particular column.
    Any suggestions ?
    Thanks,
    Jeetu

    Hi,
    define a condition for all characteristics and for specially the keyfigure. Set it to < 0. That should do the trick.
    regards
    Siggi

  • Is it possible to display a Bottom 10 on a key figure on values 0 only?

    Hi
    Is it possible using BEx Query Analyser to display a bottom 10 based on key figure values greater than 0?
    I can create a condition which has the Bottom 10 on a Sales Qty key figure, but my problem is that this key figures includes some values of zero and negative values, I want to ignore these.
    I have tried creating another condition, values > 0.  This works on it's own but not with the Bottom 10. 
    I appreciate a possible solution would be to do this in data provider but we do not have access to this in our new environment.
    Any responses appreciated, thanks in advance
            Lloyd  Bower

    Arun,
    Thanks for the reply, unfortunately your suggestion produces the same effect as one of my original ideas (two seperate conditions on same key figure).  i.e. it only reports those in the original bottom 10 with have a Key figure qty of >0,
    e.g. 3 records, as the other of the original bottom 10 have a key figure qty of 0 or a minus figure.
    I'm wanting to achieve a bottom 10 of those records with a key figure above zero.
    There are sufficient records in my data with a key figure above 0, for a bottom 10 to be reported.

  • Filtering a Query result for a specific value of a key figure

    Hi folks,
    I want to filter a query for a specific value of a key figure. The report should display all customer who has an account balance greater than EUR 500'000.
    Can I only implement this kind of filter via a condition in Query-Designer? If I run that query on an InfoCube with non-cumulative key figures over all our customers (> 400'000) I have problems with the consumption of the memory. If I restrict the amount of the customers to 50'000 - 60'000 then it works. It seems that the query reads all customer records in an internal table before applying the condition.
    Is there another way to deal with? Any help appreciated.
    Kind regards
    Hansjörg Luzi
    Graubündner Kantonalbank
    CH-7002 Chur

    You could try to implement an alternative solution: define a new Characteristc with discrete values (in the following example I suppose to have intervals of 10)
    KF -> CHAR
    115 -> 110 (110 <= KF < 120)
      5 ->   0 (  0 <= KF <  10)
    83 ->  80 ( 80 <= KF <  90)
    Then you can use these dicrete values to filter ...
    I know that it's not so "flexible" (discetization must be predefined), but query response time is quicker and you can use Aggregates ...
    Hope it helps
    GFV

  • Add update rule for new key figure in one info struc

    Hi, everyone
    I would like to know how to add update rule for new key figure in one info struc.
    Thanks ahead.
    Eric

    1)I have created the update rule for one info structure
    2)add one key figure in the info structure due to business requirement
    3)then I use MC25 to add update rule for the new key figure, but I find that there no relevant menu to do such operation.
    Can anybody tell me how to do with it?
    Any answer will be appriciated.

Maybe you are looking for

  • Transaction log full

    Transaction log is full in production system ,when i was tried login into sap system it show the error message 'SNAP_NO_NEW_ENTRIES'. our system is db2 and AIX ,can any body hlep us step by step procedure for reslove the issue . For best answer will

  • HT6147 I want a solution for find my iphone

    I remove the iPhone from find my iphone clery i think i do erset to format it and now the phone whin the find my iphone whill do shot down to the phone and give me black screen and restart mark pless help me thanx to apple coz you do the best

  • Boot camp stuck during installation option key not working

    Hi, its my first time posting in the forum. I was trying to install windows 7 on my 2011 imac, everything went flawlessly until the first windows setup restart. First of all there is a blac screen showing every time a restart to install the windowa g

  • Is it possible to restore a Yosemite time machine back up to Mavericks?

    I downgraded from Yosemite to Mavericks but I only started backing up when I was running Yosemite so once I downgraded from Mavericks I found that time machine couldn't restore my backup. Is there anyway I can get around this or do I just have to upg

  • Need Help about GPS; WLAN Nokia C6

    Hello, i need some help about my nokia c6 handy, because i can´t use the WLAN over 3 minutes. Whats wrong with this Handy, i buy them yesterday. My next problem is the GPS. I don´t have a internet flat, thats the reason that i locked my internet. But