Count Measure by Minimum values in Dimension only

Hi, I am drawing a huge blank here -
I have a Count measure on my fact table, and need to count the rows only if a code in the dimension table is the minimum code for the Fact
For my fact, I need to count from the following dims:
Dim A (count all from this dim - which would be a distinct?)
Dim B (count only the minimum code from this dim)
Any suggestions?
Thanks

Hi oroborus , you are basically trying to have two new measures in your Fact, based on some conditions.
Ex: You have a measure Total_Orders in your Fact and based on some conditions you want two new measures say Total_US_Orders and Total_OnLine_Orders.
Lets assume you have two dimensions Country_Dim and Store_Dim. which gives you location and Store of an order.
In your business model, duplicate the Total_Orders measure and name it as Total_US_Orders. Check the Use existing logical columns as the source box and go into the Expression Builder.
Here you define the formula for this new column. Which will be something like
FILTER(Fact.Total_Orders USING Country.Country_Code='US').
Similarly, create the Total_OnLine_Orders by duplicating the Total_Orders measure and write a formula something like
FILTER(Fact.Total_ORDERS USING Store.Store_Type = 'Online')
I hope this will give you a brief idea of how to create calculated columns in business layer.
Good Luck
Sai

Similar Messages

  • Minimum value without counting those with 0 values: help!

    Hi Experts,
    I need your help.  I want to list only the minimum value for kf A but not counting 0 values.  The minimum value is based on order #.  For example, I want to see the minimum order amount(kf A) for this week, not counting 0.  I can't use conditions because it would just remove that particular row from the result.  For example, if I put a condition that kf A > 0.  Then the result would yield nothing.  This is aggregate data for 1 week period.  I only need a summarize report stating that for week x, I have the lowest order of $$$(not zero), and listing all doc # on the report is not an option.  I also tried, multiply (kf A ==0)*99999, through formula kf, and that didn't work either.
       I haven't tried virtual key figure or adding another kf to cube - those are options that I afraid to tackle right now.
    Any help is appreciated,
    Thanks.

    Hi,
    Try to use Exception aggregation to aggregate based on order #.
    In the condion you put key figure value > 0.
    Regards,
    Vivek

  • MDX query Help - filtering Measures based on values in a dimension.

    Hi,
    I want to get values of a aggregate measure filtered by value available in Dimension attribute.
    Details:
    We have a Measure called "Average Compliance" which provides an average value over certain dimensions. Now I have some target values available for different attributes.
    Fact Table (there are bunch of other columns in the fact table)
    Id
    TargetId
    InstanceId
    LocationId
    Compliance
    1
    1
    1
    1
    0
    2
    1
    1
    2
    1
    3
    2
    1
    1
    1
    4
    2
    2
    1
    0
    5
    2
    1
    1
    1
    6
    2
    1
    1
    1
    Dimension
    TargetId
    Target Average Compliance
    1
    90
    2
    70
    3
    92
    4
    40
    Now I want to get a query where I can get the "Average Compliance" which is higher then the target average compliance.
    Is this achievable?
    Thanks in advance.

    HI,
    I did give this a try. (replacing the date dimensions.)
    WITH MEMBERMEASURES.mycalc AS
    [Dim Measure].[Target].
    CURRENTMEMBER.MEMBER_KEY
    SELECT
    {[Measures].[Average Compliance],MEASURES.mycalc}
    ON0
    FILTER([Dim Measure].[Target].[Target]
    ,([Measures].[Average Compliance] * 100) <
    --80
    CINT([Dim Measure].[Target].
    CURRENTMEMBER.MEMBER_KEY)
    )*[Dim Measure].[Measure Uri].[Measure Uri]
    ON1
    I am still seeing values for average compliance which are more than the target (I even tried setting the value to be hardcoded to 80 and I still see average compliance of 100
    Thanks

  • How to get all minimum values for a table of unique records?

    I need to get the list of minimum value records for a table which has the below structure and data
    create table emp (name varchar2(50),org varchar2(50),desig varchar2(50),salary number(10),year number(10));
    insert into emp (name,org,desig,salary,year) values ('emp1','org1','mgr',3000,2005);
    insert into emp (name,org,desig,salary,year) values ('emp1','org1','mgr',4000,2007);
    insert into emp (name,org,desig,salary,year) values ('emp1','org1','mgr',7000,2007);
    insert into emp (name,org,desig,salary,year) values ('emp1','org1','mgr',7000,2008);
    insert into emp (name,org,desig,salary,year) values ('emp1','org1','mgr',7000,2010);
    commit;
    SELECT e.name,e.org,e.desig,min(e.year) FROM emp e,(
    SELECT e1.name,e1.org,e1.desig,e1.salary FROM emp e1
    GROUP BY (e1.name,e1.org,e1.desig,e1.salary)
    HAVING COUNT(*) >1) min_query
    WHERE min_query.name = e.name AND min_query.org = e.org AND min_query.desig =e.desig
    AND min_query.salary = e.salary
    group by (e.name,e.org,e.desig);With the above query i can get the least value year where the emp has maximum salary. It will return only one record. But i want to all the records which are minimum compare to the max year value
    Required output
    emp1     org1     mgr     7000     2008
    emp1     org1     mgr     7000     2007Please help me with this..

    Frank,
    Can I write the query like this in case of duplicates?
    Definitely there would have been a better way than the query I've written.
    WITH      got_analytics     AS
         SELECT     name, org, desig, salary, year
         ,     MAX (SALARY)  OVER ( PARTITION BY  NAME, ORG, DESIG)          AS MAX_SALARY
         ,     ROW_NUMBER () OVER ( PARTITION BY  NAME, ORG, DESIG, SALARY
                                    ORDER BY        year  DESC
                           )                              AS YEAR_NUM
           FROM    (SELECT 'emp1' AS NAME, 'org1' AS ORG, 'mgr' AS DESIG, 3000 AS SALARY, 2005 AS YEAR FROM DUAL UNION ALL
    SELECT 'emp1','org1','mgr',4000,2007 FROM DUAL UNION ALL
    SELECT 'emp1','org1','mgr',4000,2008 FROM DUAL UNION ALL
    SELECT 'emp1','org1','mgr',7000,2007 FROM DUAL UNION ALL
    SELECT 'emp1','org1','mgr',7000,2007 FROM DUAL UNION ALL
    SELECT 'emp1','org1','mgr',7000,2008 FROM DUAL UNION ALL
    SELECT 'emp1','org1','mgr',7000,2010 FROM DUAL UNION ALL
    SELECT 'emp1','org1','mgr',7000,2010 FROM DUAL)
    SELECT     name, org, desig, salary, year
    FROM     got_analytics
    WHERE     salary          = max_salary
    AND     YEAR_NUM     > 1
    Result:
    emp1     org1     mgr     7000     2010
    emp1     org1     mgr     7000     2008
    emp1     org1     mgr     7000     2007
    emp1     org1     mgr     7000     2007
    WITH      got_analytics     AS
         SELECT     name, org, desig, salary, year
         ,     MAX (SALARY)  OVER ( PARTITION BY  NAME, ORG, DESIG)          AS MAX_SALARY
         ,     ROW_NUMBER () OVER ( PARTITION BY  NAME, ORG, DESIG, SALARY
                                    ORDER BY        year  DESC
                           )                              AS YEAR_NUM
      ,     ROW_NUMBER () OVER ( PARTITION BY  NAME, ORG, DESIG, SALARY, Year
                                    ORDER BY        YEAR  DESC
                           )                              AS year_num2
         FROM    (SELECT 'emp1' AS NAME, 'org1' AS ORG, 'mgr' AS DESIG, 3000 AS SALARY, 2005 AS YEAR FROM DUAL UNION ALL
    SELECT 'emp1','org1','mgr',4000,2007 FROM DUAL UNION ALL
    SELECT 'emp1','org1','mgr',4000,2008 FROM DUAL UNION ALL
    SELECT 'emp1','org1','mgr',7000,2007 FROM DUAL UNION ALL
    SELECT 'emp1','org1','mgr',7000,2007 FROM DUAL UNION ALL
    SELECT 'emp1','org1','mgr',7000,2008 FROM DUAL UNION ALL
    SELECT 'emp1','org1','mgr',7000,2010 FROM DUAL UNION ALL
    SELECT 'emp1','org1','mgr',7000,2010 FROM DUAL)
    SELECT     name, org, desig, salary, year
    FROM     got_analytics
    WHERE     salary          = max_salary
    AND     YEAR_NUM     > 1
    AND YEAR_NUM2 < 2
    Result:
    emp1     org1     mgr     7000     2008
    emp1     org1     mgr     7000     2007

  • Regular measures(measures with SUM function) are not working along Distinct count measures

    Hi All,
    I am creating a cube that got to have a distinct count measure and a sum measure. if i have created only sum measure then it is working fine. if i create both measures and process the cube only distinct count measure is populated. the sum measure is showing
    all blank values. i am using 2008 R2, and creating 2 different measure groups for both measures, after i include the distinct count measure the sum measure becoming null. can you please help me with this? i am breaking my head for last 2 days on this.. Thank
    You

    Ramesh, measures are affected by the context of the queries that contain them, for example and in some cases, you can get a different total count of something by two different queries, this is because the context of the first query is different than
    the second one ... keep this in mind.
    Now, I've noticed that you are "creating 2 different measure
    GROUPS for both measures", and i guess that you are trying to view those two measures _which are from different measure
    groups_ at the same time and in the same report.
    considering the info in the first point and as you are create the calculated measures in two different measure
    groups, I'm not sure but i guess that this is the problem, and i suggest you create those two calculated measures
    in the same measure group, then try to view them again and let's see.
    if the previous point didn't solve it, please post the expressions you are using to create the calculated measures, maybe this will help in finding the problem.  

  • Limiting Dimension Values to Dimension Values used on Specfic Day

    If I have a dimension with thousands of values. And within my cube, on a given day only a few of those dimension values are actually used. How can I limit the scope of my dimension values to be only the values that exist on that given day?

    You can check OLAP DML Programs chapter (chapter 4 in 11g doc set) in Oracle OLAP DML Reference document. It's part of the standard olap documentation.
    Also regd the parameterization question:
    The code as pasted below is already parameterized. By parameterization, do you mean something other than passing value from front-end to the back-end (database)?
    Typically the front end report/query will refer to a series of time dimension values -- say, 16-Jul-2012 to 22-Jul-2012 for time. The report would reference a measure with a formula referring to an olap dml program. This program is called repeatedly for each cell and the appropriate dimension member values are passed as input to the program.
    argument _tm time  <-- implies that the program accepts time dimension value (corresponding to a single cell) as input and works off the same in its calculation.
    limit time to _tm   <-- usually this is done within a tempstat context to make such changes temporary for calculation w/o affecting external time dimension status. This allows the program to set the context of calculation to current cell (say 18-Jul-2012)
    "hence what follows for the rest of the program acts on the restricted status in order to calculate the current cell's value corresponding to time dimension value = 18-Jul-2012.
    That's also why the same program can return a different value for each cell (different return value for 18-Jul-2012 compared to return value for 21-Jul-2012) although it's being looped over dimension status implicitly.
    HTH
    Shankar

  • Minimum How many dimension required for FDM integration Script

    Hi Gurus
    I have only 2 dimensions in my SQL Table name dbo.ABC (Example: 1.Entity 2.Account and amount(data value)
    Example:
    USA, SALES, 50000
    (Including value its total 3 dimensions)
    How to export this data to Target HFM Application.
    Integration Script got success when i click on validation it is shows only 2 dimension 1.Account 2.Entity. i have mapped correctly. but validation screen not showing anything. i got gold fish for validation button and Export is also showing success and got goldfish. but no data is exported to HFM application.
    in FDM outbox its created a file which is containing only *!data* text. There is no record in this file.
    I want to load the data with rest of the dimensions with [None] member combination as i don't have the additional dimensions in my source file.
    Minimum how many dimension required to export the data from FDM to HFM?
    regards
    Taruni

    Hi,
    I came to know, at least one member from the source file should be there in the integration script then only we can assign at least [None] member or any member for the target dimensions.
    My source file having only 3 dimensions ( USA,Sales,Amount)
    1.USA,2.Sales,3.$50000
    Import Screen Dimensions:
    1.Source-FM-Entity
    2.Source-FDM-Account
    3.Account Description
    4.SourceICP
    5.SourceCustom1
    6.SourceCustom2
    7.SourceCustom3
    8.SourceCustom4
    9.Amount
    In the integration script its taking the values as
    Source-FM-Entity(0)
    Source-FDM-Account(1)
    Account Description
    SourceICP
    SourceCustom1
    SourceCustom2
    SourceCustom3
    SourceCustom4
    Amount(2)
    above it shows only 0,1,2 numbers are assigned to source dimensions.
    As my source file having only 3 Dimension so it is taking only 3 dimensions shown below. rest of the dimensions it is not showing in the import screen.
    *0.Source-FM-Entity,1.Source-FDM-Account,2.Amount*
    If i assign any values(3-9) to next dimensions or if I left blank rs.fields("txtAcctDes") with its showing below error messages:
    Error: An error occurred importing the file.
    Detail: Item cannot be found in the collection corresponding to the requested name or ordinal.
    At line: (39 and 42-46)
    So i have assigned Source-FDM-Account Number<font color="Blue">(rs.fields(1) </font>Value to rest of the dimensions in my integration script.
    <font color="Blue">rsAppend.Fields("Account") = rs.fields(1).Value</font>
    rsAppend.Fields("Desc1") = rs.fields(1).Value
    rsAppend.Fields("ICP") = rs.fields(1).Value
    rsAppend.Fields("UD1") = rs.fields(1).Value
    rsAppend.Fields("UD2") = rs.fields(1).Value
    rsAppend.Fields("UD3") = rs.fields(1).Value
    rsAppend.Fields("UD4") = rs.fields(1).Value
    Now am able to import the data into import screen, And i found all the above member names as Sales as i assigned Account dimension number(1) to these members temporarily to succeed the import process . Then i have mapped to Target dimensions with [None] member combination as these members are not in original source file. Then rest of the process Export and Check is done perfectly.
    *<font color="red">1.Am i right?? Please suggest me the correct process?</font>*
    *<font color="red">2.Can we use blank values in Integration Script as mentioned below??</font>*
    rsAppend.Fields("Desc1") = rs.fields("txtAcctDes").Value
    rsAppend.Fields("Account") = rs.fields("txtAcct").Value
    rsAppend.Fields("Entity") = rs.fields("txtCenter").Value
    *1.Added value*
    Example: rsAppend.Fields("Desc1") = rs.fields("1").Value
    *2.Blank Value*
    rsAppend.Fields("Desc1") = rs.fields("txtAcctDes").Value
    *<font color="red">3.As per my observation system is not accepting blank values in integration script. Please correct me??</font>*
    Here is my Integration Script
    1     Function Integration(strLoc, lngCatKey, dblPerKey, strWorkTableName)
    2     '------------------------------------------------------------------
    3     'Oracle Hyperion FDM IMPORT Integration Script:
    4     Created By: admin
    5     Date Created: 2012-11-20-07:55:20
    6     'Purpose:
    7     '------------------------------------------------------------------
    8     Dim objSS 'ADODB.Connection
    9     Dim strSQL 'SQL String
    10     Dim rs 'Recordset
    11     Dim rsAppend 'tTB table append rs Object
    12     'Initialize objects
    13     Set cnSS = CreateObject("ADODB.Connection")
    14     Set rs = CreateObject("ADODB.Recordset")
    15     Set rsAppend = DW.DataAccess.farsTable(strWorkTableName)
    16     'Connect To SQL Server database
    17     cnss.open "Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist Security Info=False;Initial Catalog=TEST;Data Source=localhost;"
    18     strSQL = "Select * "
    19     strSQL = strSQL & "FROM ABC"
    20     'Get data
    21     rs.Open strSQL, cnSS
    22     'Check For data
    23     If rs.bof And rs.eof Then
    24     RES.PlngActionType = 2
    25     RES.PstrActionValue = "No Records To load!"
    26     FirstImportVB = False ' Assign return value of function
    27     Exit Function
    28     End If
    29     'Loop through records And append To tTB table In location’s DB
    30     If Not rs.bof And Not rs.eof Then
    31     Do While Not rs.eof
    32     rsAppend.AddNew
    33     rsAppend.Fields("PartitionKey") = RES.PlngLocKey
    34     rsAppend.Fields("catKey") = lngCatKey
    35     rsAppend.Fields("PeriodKey") =dblPerKey
    36     rsAppend.Fields("DataView") = "YTD"
    37     rsAppend.Fields("CalcAcctType") = 9
    38     rsAppend.Fields("Amount") = rs.fields(2).Value
    39     rsAppend.Fields("Desc1") = rs.fields(1).Value
    40     rsAppend.Fields("Account") = rs.fields(1).Value
    41     rsAppend.Fields("Entity") = rs.fields(0).Value
    42     rsAppend.Fields("ICP") = rs.fields(1).Value
    43     rsAppend.Fields("UD1") = rs.fields(1).Value
    44     rsAppend.Fields("UD2") = rs.fields(1).Value
    45     rsAppend.Fields("UD3") = rs.fields(1).Value
    46     rsAppend.Fields("UD4") = rs.fields(1).Value
    47     rsAppend.Update
    48     rs.movenext
    49     Loop
    50     End If
    51     'Records loaded
    52     RES.PlngActionType = 2
    53     RES.PstrActionValue = "SQL Import successful!"
    54     'Assign Return value
    55     Integration = True
    56     End Function
    Regards
    Taruni

  • Minimum value of UNIX/Linux Heartbeat Monitor in scom 2012

    Hi,
    In my environment, we have SCOM 2012 server, when I change values of UNIX/Linux
    Heartbeat Monitor: Interval , Missed
    Heartbeats and Missed Heartbeats from 300 , 630 ,2 to 120, 150, 1 in event viewer shows Error
    11112:
    The Microsoft Operations Manager Consolidate Module failed to initialize because the specified compare count is less than the minimum
    Compare count value : 1
    Minimum value allowed : 2
    One or more workflows were affected by this.
    What is the best minimum value?
    Thanks

    You've ended up in the wrong forum. mostly service manager here, Ops manager is
    over there https://social.technet.microsoft.com/Forums/en-US/home?category=systemcenteroperationsmanager. 
    That being said, the error you reference is somewhat abstracted from the values you adjusted. the error you posted is the system comparison operator complaining that it only has one thing to compare, typically you need two things to do a comparison.
    Here is a person running into a similar problem with the lync MP, where it was trying to compare the site assignment of two systems, but the environment only has one system.
    http://thoughtsonopsmgr.blogspot.com/2014/09/lync-server-2010-mp-bug-alert.html. is it possible this is an outgrowth of something similar in your unix environment? Do you have any more details about the specific health XML that's failing?

  • Minimum value/default

    I am measuring a current wich is sometimes negative and want to change the negative values to zero. I tried to choose "Data range" and set the minimum value to zero and then from the menu: Operate, make current values default. Then the value is zero as long as the program isn't running, but as soon as i start to run it, the values are negative again. What shoold I do to make them zero all the time when they are negative? (Of course, I don't want them to be negative when they are positive.)

    The data range attributes (like min/max/coerce...) just apply to the datasource - I think. To limit the display, you could maybe do some limit checking and coerce it programatically.
    A small VI should show what I mean. I am not sure if this is the only solution. You might post your question as well to the "Core" LabVIEW forum.
    Hope this helps
    Roland
    Attachments:
    LimitedValue.vi ‏26 KB

  • Error while setting Minimum value to  Input Number Spin Box..

    Hai
    I drag and drop a VO and created a table.In that table,i convert a column which contain an InputText field to Input Number Spin Box.At the time of page load ,the table fetches the datas from the DataBase and showing Number values in the SpinBox.After that,When i scroll the table through vertical scrollBar,the table showing *"fetching data"* and Error is throwing as *"The value must be Number"* .. In the VO,this attribute is Number.
    THIS ERROR ONLY OCCURS when i set the Minimum value of spinBox ..The purpose of setting minimum value is that i only want user to select ve value only..How can i restrict the user for selecting only ve values..?(ie,*How can i set minimum value to SpinBox?)*

    Try changing the datatype of your attribute in the EO to be Double instead of Number.

  • How to populate minimum value

    Hi
    I have an extractor with 2 primary keys, Indkey and Indcode.
    I need to get the minimum value of Indcode and populate the relevant Indkey.
    ex, Indkey   Indcode
         IND001    20
         IND002    30
         IND003     40
    I only need to get the record IND001 20, populated and not the other two. I am populating these values to a DSO in BW.
    How can I acheive this? Please give the algorithm or sample code.
    Thanks
    Sirisha

    sort table by key1 key2 and read table index1

  • How to capture the data within the given range of maximum and minimum values ? from csv files

    My requirement,
    1. Here, the user will provide the range like maximum and minimum values, based on this range, the VI should capture the data within the given range. ( from CSV file as attached )
    2. Then VI should calcluate the average value for captured data and export it to excel.
    This is my requirement can anyone help me on this.
    Many thanks in advance
    rc_cks
    Attachments:
    sample_short.csv ‏2439 KB

    Hi,
    Thanks for remnding me. I forgt to attach the VI, 
    Here I am attaching the VI, what I tried. 
    From attached CSV file, I have to find an average value for columns B,C,D,E,F,G,H,I and AJ, AK. ( data range will be defined  by user ), focused only on these columns
    Here, the scope is to calculate an average value for given data range by user as MAX and MIN data.  
    FYI:  I tried manually for two instance i.e column H & I.  As per H column one steady state values from  7500 to 10500 and similarly in I column 7875 to 10050. So, I gave these as a limit to capture and calculate the average value. But unfortunaltely, requirement has been modified as per below requirements.
    More Info on requirement: 
    --> The user will define the range of data by giving some MAXIMUM and MINIMUM values(for above mentioned columns induvidually), then VI should capture          that data range and it has to caculate the average value for that range of data. This is the task I have to complete. 
    --> I am stuck in creating a logic for data capturing for given range of MAX and MIN value from user, 
         Can anyone help me on this. 
    If my explanation is not clear, Please let me know.  
    Many thanks, help mw
    rc
    Attachments:
    VI_rc.vi ‏25 KB
    sample.zip ‏4166 KB

  • How to count the elements with values in a Source?

    I have 2 measures which needs the same dimensions as inputs. So i use "Source.join()" to fill the inputs of both the measures like this:
    Source result = m1.join(m2).join(d1).join(d2);
    m1, m2: the "Source"s of the "MdmMeasure"s
    d1, d2: the "Source"s of the "MdmPrimaryDimension"s
    So before retrieving the results, i want to know how many lines i'm gonna have:
    Source resultCount = result.count();
    Here is my problem : the 2 measures have "NA"(1) but not the same "line" of data, and count returns the number of lines with data for the first measure (m1).
    I would like to have the number of lines which have data in at least 1 measure.
    example:
    | d1 | d2 | m1 | m2 |
    | a | b | 1 | 2 |
    | b | c | NA | 2 |
    | b | c | 4 | NA |
    | b | c | NA | NA |
    right now, i get 2, but i would like to get 3
    Can you help me please?
    NA(1) : when ValueCursor.hasCurrentValue() return false.
    Source(2) : http://oraclesvca2.oracle.com/docs/cd/B14117_01/olap.101/b10994/oracle/olapi/data/source/Source.html

    You have to put table name in Capital letters
    Like
    SELECT COUNT(1)
      FROM user_tab_columns
    WHERE table_name = 'EMP';
    or
    SELECT COUNT(1)
      FROM user_tab_columns
    WHERE table_name = UPPER('Emp');Regards
    Arun

  • Select Query with minimum values

    Table name: employess_inout
    Column name: employee_code number(data type)
    IN_Time date(data type)
    Out_time date(data type)
    i want to select only in_time coloumn data with min intime as in one date A employee have more then 2 times in_time entry
    example
    employee_code in_time out_time
    1 18-mar-12 08:15:21 18-mar-12 13:02:01
    1 18-mar-12 14:07:46 18-mar-12 18:01:32
    1 19-mar-12 09:15:11 19-mar-12 12:58:54
    1 19-mar-12 14:10:01 19-mar-12 16:21:57
    1 19-mar-12 16:53:37 19-mar-12 18:15:33
    In above example I only want to select in_time column values which is minimum as 18-mar-12(08:15:21) like wise in date 19-mar-12 minimum value is 09:15:11.
    Please write the script.
    thanks in advance

    Dear Frank Kulash
    the Script is
    Select ei.emp_code,p.ename, d.department_name, ds.designation_name,
    to_char(ei.intime, 'dd') "IN_Date",
    to_char (ei.intime,'hh24:mi') "IN_Time" /*here i used "min" but not solved*/
    FROM einout ei, personnel p,departments d, designations ds
    where ei.emp_code = '470'
    and intime between to_date ('01/03/2012 08:10', 'dd/mm/YYYY hh24:mi')
    and to_date ('21/03/2012 10:00','dd/mm/YYYY hh24:mi')
    and ei.emp_code = p.emp_code
    AND p.dept_code = d.dept_code
    and p.desig_code = ds.desig_code
    group by ei.emp_code,p.ename, d.department_name, ei.intime,ds.designation_name --, ei.outtime
    order by ei.intime, ei.emp_code asc;
    Out Put
    EMP_CODE ENAME DEPARTMENT_NAME DESIGNATION_NAME IN_Date IN_Time
    470 GHULAM YASSEN INFORMATION TECHNOLOGY OFFICER 01 09:15
    *470      GHULAM YASSEN             INFORMATION TECHNOLOGY         OFFICER                   02          08:58*
    *470      GHULAM YASSEN             INFORMATION TECHNOLOGY         OFFICER                   02          14:04*
    *470      GHULAM YASSEN             INFORMATION TECHNOLOGY         OFFICER                   02          15:11*
    470 GHULAM YASSEN INFORMATION TECHNOLOGY OFFICER 03 09:06
    470 GHULAM YASSEN INFORMATION TECHNOLOGY OFFICER 05 17:07
    470 GHULAM YASSEN INFORMATION TECHNOLOGY OFFICER 06 09:47
    470 GHULAM YASSEN INFORMATION TECHNOLOGY OFFICER 07 09:36
    *470 GHULAM YASSEN INFORMATION TECHNOLOGY OFFICER 07 19:39* 470 GHULAM YASSEN INFORMATION TECHNOLOGY OFFICER 08 12:16
    470 GHULAM YASSEN INFORMATION TECHNOLOGY OFFICER 09 09:26
    *470 GHULAM YASSEN INFORMATION TECHNOLOGY OFFICER 09 14:08*
    I want to take out put
    like that
    EMP_CODE ENAME DEPARTMENT_NAME DESIGNATION_NAME IN_Date IN_Time
    470 GHULAM YASSEN INFORMATION TECHNOLOGY OFFICER 01 09:15
    470 GHULAM YASSEN INFORMATION TECHNOLOGY OFFICER 02 08:58
    470 GHULAM YASSEN INFORMATION TECHNOLOGY OFFICER 03 09:06
    470 GHULAM YASSEN INFORMATION TECHNOLOGY OFFICER 05 17:07
    470 GHULAM YASSEN INFORMATION TECHNOLOGY OFFICER 06 09:47
    470 GHULAM YASSEN INFORMATION TECHNOLOGY OFFICER 07 09:36
    I only need min time (value) once of A date.
    [Bold rows are no need in output]
    please tell how it will be possible

  • Dimension only query to show manager and employees in one row

    Hi Gurus,
    I am creating a dimension only report. This report will show managers and their direct reportees. Since one manager can have several employees working under him, I am getting one row in the report for each employee. But our end users want employees to appear as comma seperated value for the manager. Thus each manager will have one and only one record in the report
    Current
    ======
    Manager Employee
    M1     E1
    M1     E2
    M1     E3
    Expected
    =======
    Manager Employee
    M1     E1, E2, E3
    Env : OBIEE 10.1.3.4 & Oracle 10.2.0.3.0
    Thanks for your help in advance

    Google ask Tom for string aggregation - there is a listagg equivalent available there, create on your DB then follow the same principal as the listagg / evaluate example.
    regards,
    Robert.

Maybe you are looking for