HELP -- About a query design

how to calculate a characteristic's  different value? let me give a example:
i have a infocube, it has three characteristics: Grandfather, father, SonOrDaughter and one key figure : counter. from the data point of view, One Grandfather may have n(>=0) sons(it means many fathers belong to 1 grandfather) and one father can have m(>=0) sons or daughters. Our key figure always equal 1 for each record in the infocube.
Now I need a query to display the number of the fathers who have son. Attention: if a father have two son, it should only be count once.
HELP!

Hi,
In the Query Designer Right click on the Characteristic and Key Figure and choose the properties as specified
Example-
report with monthly sales. the months are decided at runtime. sales values for each month are displayed in columns for each month. The result (total for all months for a customer) is seen.
how to calculate running average for this total? i know the total value, but is determined at runtime. also the denominator i.e the no. of months for which the values exist is also known only at runtime.
Go to BEx Designer, right click on Key figure & choose "calculate Result as Average".
Hareesh

Similar Messages

  • Some question about the query designer

    hello, dear all,
    I am a new comer of here, and I am intersting in BI, but I have no basic knowledge about it.
    so I just want someone could give me some advice about it.
    our boss need I do the developer about the query designer,  I just have searched in this forum. but nothing founded for I am a new comer here,
    I heard there are some training document of the query designer, could someone give me the URL, thanks.

    Hi,
    Query desinger is used to develop a Query, Query can be created on following data targets
    -Info Cube
    -DSO
    Virtual data target
    -MultiCube
    -Infoset
    -Multiprovider
    We have 5 section in query designer
    - Infoprovider : where we select the data target , on which report to be created
    -Filter : to restrict value at infoprovider level ( if you want data for year 2008, for example)
    -Free Characterstic : this allow you to drill down
    -Columns : char/keyfigs to be display in columns can be added here
    Row: key/char to be display in Rows can be added here
    gv me ur mailid i will let u have Bex manual,
    I would suggest , if you have any IDES ( training ) system , where you can log in and then go to RRMX,
    and try to create new query and add any data target ( which is already created ) and then drag and drop the char/key fig to the required section ,
    save it and execute it .....
    if you play arround and see the output , that would help u to understand how to work with query designer.
    Hope this helps
    Sukhi
    Edited by: Sukhvidner Singh on Nov 4, 2009 5:36 PM

  • Need help in bex query designer

    hi experts ,
    Actually we had a ODS where the KPI's values  for all weeks are present and also the module.
    in the query designer we need to show the targets for respective KPI's modulewise.
    the requirement is
    module-selections
    week no-selection
    targetweek1week2---week3
    KPI1--10090---90--
    90
    KPI2--95-7885-----90
    based on the module selection the targets values should change and also there should not be any restriction on weeks.
    and also exceptions needs to be done for color coding.
    we actually implemented cell defination for getting the above requirement , but here the problem is that we need to fix the  targets and there is arestriction on the weeks . but the requirement should be dynamic i.e, the targets should be configurable and the weeks should not be restricted.
    in the backend ODS all weeks data is present. we just need an idea how to fix these targets and also color coding for the respective KPI's without using cell defination.
    Kindly throw some pointers how to acheive this..
    thanks in advance,
    Madhu

    Hi Madhuri,
      Ur requirement can be done by using a customer exit variable,keeping any sap stand. time characteristics value.
    If u want to define the any selection dynamically,make a new selection with the text variable and call the customer exit variable into it and assaign the corresponding KPI into it and there by u can define the offset value as well.
      for writting the customer exit,u need to contact ur ABAP'er and say the requirement.
    Hope this helps!!

  • Help needed in Query design

    Hello Query experts,
    I have the following data in my DSO.
    Char1      date                      Kf1     KF2
    a           01.01.2011              10       20
    a           03.01.2011              50       70
    a           05.01.2011                5       10
    b           02.01.2011              20        25
    b           05.01.2011              10        15
    b           06.01.2011               5         15
    Now, I need to design a query to produce the following result:
    Char1      date                      Kf1     KF2     KF3(KF2-KF1)        KF4
    a           01.01.2011              10       20             10                     10
    a           03.01.2011              50       70             20                     30 [KF3+Prev(KF4)]
    a           05.01.2011                5       10              5                      35
    b           02.01.2011              20       25              5                       5
    b           05.01.2011              10       15              5                      10
    b           06.01.2011               5        15             10                     20
    Can anybody help me achieve this through a BI Query?
    Thanks and regards,
    Jashua

    HI,
    I think kf3 can easily be created at query level itself without writing complex logic..As far as i understand your requirement kf3 is a differnce of kf2 and kf1.
    so jst make local formula and in that put kf2-kf1.it will give you the desired output for kf3.
    Kf4 i need to think,i will update you soon

  • Need some help about a query

    Hello,
    I'm new to oracle DB.
    Can someone help me with this query please?
    I want a query which returns the details of all the DML and DDl queries performed on a database in a particular period of time like for example from that date to today.
    Thank you..

    All changes made to user data or to the data dictionary are recorded in the Oracle redo logs. Therefore, redo logs contain all the necessary information to perform recovery operations. Because redo log data is often kept in archived files, the data is already available.
    Actually to do this you got to have DBA privileges.
    You have to use oracle LOGMINER
    Oracle Corporation provides SQL access to the redo logs through LogMiner, which is part of the Oracle database server. LogMiner presents the information in the redo logs through the V$LOGMNR_CONTENTS fixed view. This view contains historical information about changes made to the database
    Please refer the following link to get more details on the same.
    http://docs.oracle.com/cd/B10501_01/server.920/a96521/logminer.htm
    Hope this helps :)

  • Help about SQL Query

    Hi All,
    I have 3 tables. DEV,APPS,DISC
    DEV Contains data as follows.
    Cardnum    Stat   Flag
    324657      A      GAPPS contains as follows.
    Cardnum Stat balance Product
    324657 A 90 HYG
    3276890 D 0 BNH
    32675 S 89 HGF
    DISC contains
    Cust_Num     Num
    898777          1
    231321          2
    38927          898now I have written SELECT query as follows.
    SELECT c.cardnum, cust_num
      FROM tmp.ccard_gen g,
           tmp.ccard_tmp c,
           ods.phonenr p
    WHERE flag         = 'V'
       AND c.cardnum       = g.cardnum
       AND '32' || p.num   = c.cardnum
       AND c.balancel > 0
       AND c.product = 'SEWING';I don't have product SEWING in DISC and flag 'V'. so I am going to Insert those two values into two tables and then trying to retrieving the records by using above mentioned SELECT Statement.
    But I want to write a single query for Inserting records into those 2 tables and retrieving the records.
    can any one please help me out to writ a query for the issue.
    Thank you,

    You can't insert records with a query. These are two different things.
    What you can do is generate records on the fly
    e.g.
    SQL> ed
    Wrote file afiedt.buf
      1  with myemps as (select empno, ename, sal from emp
      2        union all select 8000, 'FRED', 1000 from dual
      3        union all select 8001, 'BOB', 1200 from dual)
      4  --
      5  select *
      6* from myemps
    SQL> /
         EMPNO ENAME             SAL
          7369 SMITH             800
          7499 ALLEN            1600
          7521 WARD             1250
          7566 JONES            2975
          7654 MARTIN           1250
          7698 BLAKE            2850
          7782 CLARK            2450
          7788 SCOTT            3000
          7839 KING             5000
          7844 TURNER           1500
          7876 ADAMS            1100
          7900 JAMES             950
          7902 FORD             3000
          7934 MILLER           1300
          8000 FRED             1000
          8001 BOB              1200
    16 rows selected.
    SQL>

  • Please help about function query permformance

    Hi
    I have a j2ee web application with oracle database.
    I finish the function implementation by put all caculaton inside oracle query ( funciton (todayData - avg(historical data )) / std(historical data) and using group by and sub query .but performance is very slow about 3 minute whick is far from client's 10 second requirement.
    My question is if I take raw data from database and do the caculation part in Java will it be faster. Is there some other way to speed up the process?(historical data is big)
    Thanks for your time and help

    What does the function look like? How is it called? What is the query and explain plan? Are statistics up to date?
    My question is if I take raw data from database and do the caculation
    part in Java will it be faster.No.
    Is there some other way to speed up the process?(historical data is big)You should start by posting the explain plan and looking into the other questions above.

  • Help about the query

    Hi,
    I have table MYTABLE
    like
    Text - Name
    'ABC' first
    'DEF' second
    How can I get Query result 'ABCDEF'
    Thanks a lot

    Maybe you could use Analytical Functions
    SQL> create table mytable(text varchar2(10),name varchar2(10));
    Table created.
    SQL> insert into mytable(text,name) values ('ABC','first');
    1 row created.
    SQL> insert into mytable(text,name) values ('DEF','second');
    1 row created.
    SQL> select text,
      2         lag(text) over (order by name) as oth
      3  from mytable;
    SQL> commit;
    Commit complete.
    SQL> select text,
      2      lag(text) over (order by name) as oth,
      3      (lag(text) over (order by name) || text) as combined
      4  from mytable;
    TEXT       OTH        COMBINED
    ABC                   ABC
    DEF        ABC        ABCDEF-cf

  • Help on BEx query design

    Hello BW Gurus,
         I'm new to SAP- BW and my requirement is to count the no of Contract Accounts in a InfoCube without showing the Contract Account in a report. Anyone tell me what are all the ways and how it can be achieved.
    Thanks,
    Umashankar

    Hello VC,
        Thanks for your reply, and now the problem is in almost finished state, but im facing another problem.
          As you explained 100 Contract Account are selected based on the specific creteria.if i put the variable of defination (Count(1)) in column, instead of showing 100 in result it is showing more than that.
          And Here in my Cube Contract Account is a Dimension (you might be knowing, just mention for the sake of info).
          And my report looks like
    Contract Account(row) | Formula (Count(1)) (Col)| Contract Account selection creteria1 (Col) | Contract Account selection creteria2 (Col)|..............
    Hope this will give you clear picture. if no let me know.
    Thanks a lot,
    Umashankar

  • Bi 7.o query design help

    Hi SAP Gurus,
    I am new to BI, and am trying to design a query using BEx , Does anyone have steps by step procedure with screen shots for query designing and reporting in BI 7.O
    Thanx in advance

    Hi,
    u can get more info from sap help..
    Query Designer - It is a tool where queries are created/changed. It is a GUI based tool where you drag and drop the field you need.
    Report Designer - It is tool introduced in BI 7.0 for formatting the Bex Reports. You can use this tool to add header, footer and make all cosmetic changes to a bex report.
    for more info reg procedure go through the links in this thread... thread...
    [/thread/247004 [original link is broken];
    hope it helps...

  • Bex Query designing issue

    Hi,
    Need help for the following scenerio,
    There is data for Year (Numc..2010 we can do this by offset because it is Numc) and Year Quarter(Char..2010 Q1But this char..I think not possible) fields in the cube.But report requirement is last 3 recent Quarters data and previous 6 years of data into report.
    FYI..PFA screen,
    For ex:
    2006
    2007
    2008
    2009
    2010
    2011
    2012 Q1
    2012 Q2
    2012 Q3
    2012 Q4
    2013 Q1
    2013 Q2
    2013 Q3
    2013 Q4
    2014 Q1
    2014 Q2
    2014 Q3
    2014 Q4
    Appreciate your help.
    Thanks,
    Ram

    Dear Ravi,
    Could you please check the behaviour in TX RSRT.
    This could be bug, also check if the below notes are helpful.
    1259625    Query Designer: Texts are not updated or missing
    1246021    Structure member texts are not displayed
    1229140    Column headers not displayed
    1279430    Structure member texts are not displayed
    Regards,
    Arvind

  • Need Help: Query Designer

    Hi experts,
    In Query designer, is it possible to create an IF statement for "IRRATIONAL NUMBERS"?
    Lets say 10.03, 1.26, 3.1 and so on...
    The statement would be as follow:
    If Val1==N.x then 0 else Val1.
    To summary, if the value is N.x (N for rational numbers 1,2,3,... and .x for decimal values like .23, .44, .01 and so on...),
    then the value N.x will be changed or converted into "0".
    Example: If the value of FieldA on the report is 10.3, it then should be converted into Zero "0".
    another is if value is 1.03, then the report should show 0 instead of 1.03
    I arrived to a solution wherein I have to create three logic expression.
    First is to convert first the Irrational Number into Zero "0".
    Second is to create new selection in KF wherein it will pull the data containing the converted "N.x to Zero".
    And third is to create the IF statement logic that will satisfy my expected value.
    I'm having this problem on the first one as I have no idea how to convert irrational number into zero "0" value.
    the second and the last part would be fine as my main problem here is how can I convert the irrational number in to zero?
    Any suggestions?

    Hi,
    Please try the below.. Hope this will solve your issue
    Eg. of data
    Dist. Channel  -
    Value
    Dom1----100.5
    exp1----200.4
    dom2---50
    exp2---75
    Expected out put
    Dist. Channel  -
    Value
    Dom1----0
    exp1----0
    dom2---50
    exp2---75
    Steps1
    Drag and drop Dist.Channel in row and value in colum
    create a formula1 using ur kf value 
          CEIL(value)    --- which will provide us integior part with out decimal
    Steps2
    create another fomula2
    using boolean operator compare the value
    (formula2==value)*value
    this formula compare our two values and will produce a boolean value ie 1 or 0
        :  Eg 100.5  ceil(100.5) = 100  Now in our formula1 we are comparing these two values are equal or not ie 100.5 - 100 so out come will be 0 then 0100.5 = 0 always if our condition is true then 1100 = 100
    Related Links :
    Boolean Operator
    http://help.sap.com/saphelp_nw04/helpdata/EN/71/0aec3b6e011341e10000000a114084/frameset.htm
    Thanks
    BVR

  • About variables in query designer

    what is the difference between replacement path and cmod in query designer?
    illustrate with an example?
    Regards,
    Bhavya K

    Hi,
    Replacement path:
    When you create a variable ,if you want the variable to be replaced with the value from an info object/another variable /Query/Hierarchy  then we select Replacement path
    CMOD:
    If the values for the variable are to be collected based on the ABAP logic written for the variable in CMOD then we go for CMOD selection.
    Refer the links for examples:
    http://www.sapks.com/2010/04/replacement-path-in-variable-reporting.html
    http://help.sap.com/saphelp_nw04/helpdata/en/2c/78a03c1178ad2ce10000000a114084/content.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/03/6ba03cc24efd1de10000000a114084/content.htm
    Refer to this link for scenarios on Cmod from Mr.Surendar reddy
    http://wiki.sdn.sap.com/wiki/display/profile/Surendra+Reddy
    @ Sri
    Edited by: Sri kamesh on Mar 2, 2012 7:30 PM

  • After upgrade from SQL Server to SQL server 2012 I cannot show Query Designer ?? Please help

    Hi
    I have installed the required .Net software, but never the less I've got this message. Could you please help me out ?
    Thanx in advance
    Pia 
    TITLE: Microsoft SQL Server Management Studio
    Cannot show Query Designer.
    ADDITIONAL INFORMATION:
    Exception has been thrown by the target of an invocation. (mscorlib)
    Unable to find the requested .Net Framework Data Provider.  It may not be installed. (System.Data)
    BUTTONS:
    OK

    also check
    http://connect.microsoft.com/VisualStudio/feedback/details/652192/visual-studio-2010-add-connection-fails
    mostly machine.config is referring to .net 3.0 assemblies
    Balmukund Lakhani
    Please mark solved if I've answered your question, vote for it as helpful to help other users find a solution quicker
    This posting is provided "AS IS" with no warranties, and confers no rights.
    My Blog |
    Team Blog | @Twitter
    | Facebook
    Author: SQL Server 2012 AlwaysOn -
    Paperback, Kindle

  • Application Help for Query Designer for Netweaver 2004S

    Does anyone know how to install the Help Files for the Business Explorer Tool for Netweaver 2004S?  When I click on the Help>>Applicaton Help from any of these tools, it states it can't find the files.  I have it setup and working within ABAP.
    Thanks,
    Jeff Cook

    The help dvd that came with upgrade explains how to setup for the ABAP side, not the Query Designer.  Do you know the parameter settings?  Does Query Designer help use the sapdoccd.ini file?
    Thanks ,
    Jeff

Maybe you are looking for

  • Hp dj 2510 how to print on a A9 envelope

    Hi,  I have a HP DJ 2510 as a utility printer - on the advanced setting there is no A9 envelope listing, but lots of weird japanese speciality settings. First, do I have the correct software? If so, how do I get it to print on a fairly common sized A

  • Audio and video out of sync on converted AVI file

    I am trying to convert a DVD to an AVI for playback on a device. When I import the DVD and publish it as an .AVI the output audio and video are out of sync. After about an hour of playback the audio lags the video by a full second. How can I correct

  • How to get rid of an apple id from a iphone

    I gave my sister my old iphone to get a difrent phone and when she got a new sim recently I keep getting popups to add the number to my ipod's facetime , imessenger ect. she was using my apple id and then made a new one and just signed in to her phon

  • Decentralized WM

    Hi All, We try to find out solutions for some unknown subjects on decentralized warehouse management system. 1. After setting connection between ERP and DeWM systems, When we shut down the ERP system for maintenance for an interval time, could we abl

  • Discussion Reply Email Links

    Hi folks. I'm guessing this is where I provide feedback and suggestions for these forums.  There's something that bothers me about this system.  I post a question and I get replies.  Let's say a day later, I get a reply.  An email is sent to me with