Median calculation in BW

Hi,
I need to show median figures in BEX reports.
Can somebody help me with this issue?
Best Regards,
Michael

Hi,
In BEx you don't have direct Median function, on result you can but not on rows.
Another option can be:
1. Use APD, there you have such features.
[Formulas to Calculate the Statistics|http://help.sap.com/saphelp_nw04/helpdata/en/cc/db2040599a8f5ce10000000a155106/frameset.htm]
2. Create formula on your characteristic and use it in calculation for median. I am not clear what chars you are using but giving more data from your requirement will help to think more on solution part.
Hope it helps...
Regards,
Ashish

Similar Messages

  • MDX Query using BottomCount to limit Median calculation returns null

    I'm building a new cube that includes some person age values that aren't useful when summed, but are
    useful when the median is determined. The measure group that contains the measure for the age has a 1-1 relationship with a dimension in the cube because both use the same table as the source. This is important because I use the key attribute of the dimension
    as the set expression in the Median function to prevent any summation before the median is found. Here is the code for the original median calculation:
    MEMBER Measures.[Median Age] AS
    MEDIAN(
    [Placement Dimension].[Id Removal Episode Fact].Members,
    [Measures].[Age At Removal Months]
    This median naturally represents the half-way point in the series of values. My analysts have also requested
    median-type values at the quarter and three-quarter points in the same series. I've been able to accomplish this for the three-quarter point by nesting the TopCount function in the set expression of the Median function to limit the set to the last half of
    the records and then find the median point like this:
    MEMBER Measures.[75th Percentile] AS
    MEDIAN(
    TOPCOUNT(
    [Placement Dimension].[Id Removal Episode Fact].MEMBERS
    ,Measures.[Episode Count] / 2
    ,Measures.[Age At Removal Months]
    ,Measures.[Age At Removal Months]
    However, my attempt to use the BottomCount function in the same way as TopCount to find the quarter point
    in the whole data set by limiting the calculation's set to the first half of the data always returns null. Here is how I've formed the code:
    MEMBER Measures.[25th Percentile] AS
    MEDIAN(
    BOTTOMCOUNT(
    [Placement Dimension].[Id Removal Episode Fact].MEMBERS
    ,Measures.[Episode Count] / 2
    ,Measures.[Age At Removal Months]
    ,Measures.[Age At Removal Months]
    And here is the query that returns the values:
    SELECT
    Measures.[Episode Count]
    ,Measures.[Median Age]
    ,Measures.[25th Percentile]
    ,Measures.[75th Percentile]
    } ON 0
    ,[Date Begin].[Calendar Hierarchy].Year.&[2011]:[Date Begin].[Calendar Hierarchy].Year.&[2014] ON 1
    FROM [POC Cube]
    WHERE
    [Age at Removal Mos].[Age in Years List].[Age Year].&[0]:[Age at Removal Mos].[Age in Years List].[Age Year].&[5]
    I don't know why the end result is always null. I don't have any null values in the data for this measure, and I know what values I should be seeing because I've found the median records manually in results from a SQL Server query. I've tried using TopCount
    and multiplying Measures.[Age At Removal Months] in the TopCount function by -1 to workaround the descending sort, but I still get nulls. I've also tried separating these queries out so the quarter point and three-quarter point calculations aren't run together,
    but I still get nulls for the quarter point calculation.
    I'm open to any help fixing this situation by modifying my current code or by using alternate methods, but the end result has to be dynamic enough to be used as a calculation in the cube. Thanks!

    The links might helps.
    http://technet.microsoft.com/en-us/library/ms144864.aspx
    http://www.mssqltips.com/sqlservertip/3034/sql-server-analysis-services-ssas-2012-top-and-bottom-functions/
    http://www.sqlservercentral.com/blogs/bradleyschacht/2012/03/12/mdx-functions-bottomcount/

  • Problem in median calculation in powerpivot

    Hi All,
    I have used below formula to find out median:
    Lowerbound:=MINX( FILTER(VALUES('Table1'[Time Taken]), CALCULATE( COUNTROWS('Table1'), 'Table1'[Time Taken] <= EARLIER('Table1'[Time Taken]) )  >= COUNTROWS('Table1') / 2 ), 'Table1'[Time Taken])
    Upperbound:=MINX( FILTER( VALUES('Table1'[Time Taken]), CALCULATE( COUNTROWS('Table1'), 'Table1'[Time Taken] <= EARLIER('Table1'[Time Taken]) )  > COUNTROWS('Table1') / 2 ), 'Table1'[Time Taken])
    Custom Median:=([Lowerbound]+[Upperbound])/2
    But Inside PowerPivot I am not able to see calculated values for any of the above measures. And when I drag this measure inside Pivot Table my workbook hangs. I have to kill EXCEL process from the task manager.
    Anybody has an idea what exactly is happening?
    Thanks,
    SS

    Hi Mike,
    Above formula failed in production environment. It's throwing following error:
    Could not add the field "Median Custom" to the PivotTable because the formula is invalid.
    But it works well with lesser no. of records.
    Please find below Michael's reply:
    The DAX formulas you have presented will consume quite a bit of memory due to how the EARLIER function works (i.e. the use of inner and outer loops). The degree of memory consumption grows significantly as the number of rows increases.
    Perhaps you could try an approach described in this blog post created by a fellow forum member (Gerhard Brueckl) as it avoids the use of the EARLIER function: http://blog.gbrueckl.at/2013/04/calculating-median-in-powerpivot-using-dax/.
    I have followed the steps mentioned in above link, but I am getting error in formula.
    Thanks, SS

  • Median function in report builder 3.0

    I need to perform median calculation in MS Report Builder 3.0, could anyone explain how I could achieve it considering my original value are
    Region - Etab - Value
    Abc - Def - 10
    Abc - Def - 12
    Ged - Tae - 1
    I need to group by Region and Etab.
    I've already built a SQL query to get the Median, but I would like to be able to use Report Builder grouping for usability.

    I've managed to get the proper values using hashtable the following way :
    Dim theHashTable As New System.Collections.Hashtable
    Function AddValue(theRapport As String, theRegion As String, theEtab As String, theRow As String, theValue As String) As Integer
    Dim num As Integer
    num = 0
    If (theHashTable Is Nothing) Then
    theHashTable = New System.Collections.Hashtable
    End If
    If Integer.TryParse(theValue, num) Then
    If (num >= 0) Then
    If (theHashTable.ContainsKey(theRapport)) Then
    Dim regionHT As New System.Collections.Hashtable
    regionHT = theHashTable(theRapport)
    If (regionHT.ContainsKey(theRegion)) Then
    Dim etabHT As New System.Collections.Hashtable
    etabHT = regionHT(theRegion)
    If (etabHT.ContainsKey(theEtab)) Then
    Dim valueHT As New System.Collections.Hashtable
    valueHT = etabHT(theEtab)
    If (Not valueHT.ContainsKey(theRow)) Then
    valueHT.Add(theRow, theValue)
    End If
    etabHT(theEtab) = valueHT
    Else
    Dim valueHT As New System.Collections.Hashtable
    valueHT.Add(theRow, theValue)
    etabHT.Add(theEtab, valueHT)
    End If
    regionHT(theRegion) = etabHT
    Else
    Dim etabHT As New System.Collections.Hashtable
    Dim valueHT As New System.Collections.Hashtable
    valueHT.Add(theRow, theValue)
    etabHT.Add(theEtab, valueHT)
    regionHT.Add(theRegion, etabHT)
    End If
    theHashTable(theRapport) = regionHT
    Else
    Dim regionHT As New System.Collections.Hashtable
    Dim etabHT As New System.Collections.Hashtable
    Dim valueHT As New System.Collections.Hashtable
    valueHT.Add(theRow, theValue)
    etabHT.Add(theEtab, valueHT)
    regionHT.Add(theRegion, etabHT)
    theHashTable.Add(theRapport, regionHT)
    End If
    End If
    End If
    Return num
    End Function
    Function GetMedian(theRapport As String, theRegion As String, theEtab As String) As String
    Dim arrayInt As New System.Collections.ArrayList
    arrayInt = GetArray(theRapport, theRegion, theEtab)
    arrayInt.Sort()
    Dim mid As Double = (arrayInt.Count - 1) / 2.0
    Dim midInt As Integer = mid
    Dim mid2Int As Integer = mid + 0.5
    If arrayInt.Count >= 2 Then
    Return ((arrayInt(midInt) + arrayInt(mid2Int)) / 2).ToString()
    ElseIf arrayInt.Count = 1 Then
    Return arrayInt(0)
    Else
    Return ""
    End If
    End Function
    Function GetQ1(theRapport As String, theRegion As String, theEtab As String) As String
    Dim arrayInt As New System.Collections.ArrayList
    arrayInt = GetArray(theRapport, theRegion, theEtab)
    arrayInt.Sort()
    Dim taille As Integer = arrayInt.Count
    If (taille = 1) Then
    Return arrayInt(0)
    ElseIf ((taille Mod 2) = 0 And taille > 0) Then
    Dim mid1 As Integer = taille / 2
    Dim midmid As Integer = mid1 / 2
    If (mid1 Mod 2 = 0) Then
    Return ((arrayInt(midmid - 1) + arrayInt(midmid)) / 2).ToString()
    Else
    Return (arrayInt(midmid)).ToString()
    End If
    ElseIf (taille = 1) Then
    Return arrayInt(1)
    ElseIf ((taille - 1) Mod 4 = 0) Then
    Dim n As Integer = (taille - 1) / 4
    Return ((arrayInt(n - 1) * 0.25 + arrayInt(n) * 0.75)).ToString()
    ElseIf ((taille - 3) Mod 4 = 0) Then
    Dim n As Integer = (taille - 3) / 4
    Return ((arrayInt(n) * 0.75 + arrayInt(n + 1) * 0.25)).ToString()
    Else
    Return ""
    End If
    End Function
    Function GetQ3(theRapport As String, theRegion As String, theEtab As String) As String
    Dim arrayInt As New System.Collections.ArrayList
    arrayInt = GetArray(theRapport, theRegion, theEtab)
    arrayInt.Sort()
    Dim taille As Integer = arrayInt.Count
    If (taille = 1) Then
    Return arrayInt(0)
    ElseIf ((taille Mod 2) = 0 And taille > 0) Then
    Dim mid1 As Integer = taille / 2
    Dim midmid As Integer = mid1 / 2
    If (mid1 Mod 2 = 0) Then
    Return ((arrayInt(mid1 + midmid - 1) + arrayInt(mid1 + midmid)) / 2).ToString()
    Else
    Return (arrayInt(mid1 + midmid)).ToString()
    End If
    ElseIf (taille = 1) Then
    Return arrayInt(1)
    ElseIf ((taille - 1) Mod 4 = 0) Then
    Dim n As Integer = (taille - 1) / 4
    Return ((arrayInt(3 * n) * 0.75 + arrayInt(3 * n + 1) * 0.25)).ToString()
    ElseIf ((taille - 3) Mod 4 = 0) Then
    Dim n As Integer = (taille - 3) / 4
    Return ((arrayInt(3 * n + 1) * 0.25 + arrayInt(3 * n + 2) * 0.75)).ToString()
    Else
    Return ""
    End If
    End Function
    Function GetArray(theRapport As String, theRegion As String, theEtab As String) As System.Collections.ArrayList
    Dim arrayInt As New System.Collections.ArrayList
    If (theHashTable Is Nothing Or theHashTable.Count = 0) Then
    Return arrayInt
    Else
    If (theHashTable.ContainsKey(theRapport)) Then
    Dim regionHT As System.Collections.Hashtable
    regionHT = theHashTable(theRapport)
    If (theRegion = "" And theEtab = "") Then
    For Each value As System.Collections.Hashtable In regionHT.Values
    For Each value2 As System.Collections.Hashtable In value.Values
    For Each valeur As Integer In value2.Values
    arrayInt.Add(valeur)
    Next
    Next
    Next
    ElseIf (regionHT.ContainsKey(theRegion) And theEtab = "") Then
    Dim etabHT As System.Collections.Hashtable
    etabHT = regionHT(theRegion)
    For Each value As System.Collections.Hashtable In etabHT.Values
    For Each valeur As Integer In value.Values
    arrayInt.Add(valeur)
    Next
    Next
    ElseIf (regionHT.ContainsKey(theRegion) And theEtab <> "") Then
    Dim etabHT As System.Collections.Hashtable
    etabHT = regionHT(theRegion)
    If Not (etabHT Is Nothing Or etabHT.Count = 0) Then
    If (etabHT.ContainsKey(theEtab)) Then
    Dim valuesHT As System.Collections.Hashtable
    valuesHT = etabHT(theEtab)
    For Each value As Integer In valuesHT.Values
    arrayInt.Add(value)
    Next
    End If
    End If
    End If
    End If
    Return arrayInt
    End If
    End Function
    Function PrintArray(theRapport As String, theRegion As String, theEtab As String) As String
    Dim arrayInt As New System.Collections.ArrayList
    arrayInt = GetArray(theRapport, theRegion, theEtab)
    Dim str As String = ""
    If (arrayInt.Count > 0) Then
    str = String.Join(" | ", arrayInt.ToArray)
    Else
    str = " "
    End If
    Return str
    End Function
    The first hashtable is for different tables of the report needing the median.
    I then use the following command to add value
    Code.AddValue("3_2",Fields!Region.Value,Fields!Etablissement.Value,Fields!rowNumber.Value,Fields!Value.Value)
    Then I get the median using the expressions
    =Code.GetMedian("3_2", Fields!Region.Value,Fields!Etablissement.Value)
    =Code.GetMedian("3_2", Fields!Region.Value,"")
    =Code.GetMedian("3_2", "","")
    I've tried placing the AddValue fonction on a hidden table and in the summary row of the tables.
    I get the proper value but as soon as I expand or collapse a row everything is change to blank. How can I keep the value or where could I put the AddValue function to make sure it is called on every action, for every table in the report ?
    Thanks

  • Advise on median MDX query and/or dimension hierarchy setup

    Hey guys,
    I have a fairly weird situation with SSAS/Dimension Hierarchies and an MDX based median-calculation that is actually not working as I would like it to work.
    Hierarchy
     - State
     - County
     - Town
     - Neighborhood
     - Filing Date
     - Usage Category
     - TransactionID (PRIMARY KEY)
    I have a hierarchy set up which shall be used in order drill down the cube. The median, which shall be calculated based off the Sales Price measure and all the affected records, shall be available at every single level of the hierarchy. That is also why
    I decided to use a hierarchy: I am at least not aware of a do-able alternative that would allow to use any available dimension without a hierarchy and calculate the median dynamically based off on that.
    This is the MDX expression I use in order to calculate the median.
    Median
          NONEMPTY(EXISTING Descendants( [Statistics Hierachy1].[Hierarchy].CurrentMember,
                       [Statistics Hierachy1].[Hierarchy].[Transaction Id])),
            [Measures].[Sale Price]
    It works, and the numbers are correct, but it is way too slow in order to use it properly.
    The hierarchy of dimension states that there is no relationship between the attributes of the hierarchy. That is right, because every single attribute is an attribute to the primary key (TransactionId).
    So for me there are three ways to solve this:
     1) Set up relationships. That, for some reason, brings up only a very limited subset of my data. Not sure why?
     2) Get the hierarchy to work properly so it calculates the underlying median FASTER!
     3) Set up a different measure (maybe my MDX is totally wrong?) to calculate the median the right way? In the end the median needs to be calculated based off on all underlying transactions that make up to the current level of the hierarchy.
    In the end we are not talking about a ultra-large cube. Right now it only has like 3.1 Million rows in its one single partition.
    Can anybody of you help me to address either the issue I am facing with the hierarchy (one I set up the relations I only see a subset of data) and/or let me know how to set up the median measure the right way ?
    Thanks in advance! I really appreciate any help!
    Thanks,
    Lars

    Hi L,
    I would encourage you to set up the attribute hierarchies.  That will make your calculation much faster, the further down the user is in the hierarchy.  This is because the nonempty set you are getting the median from will be much smaller.
    As you point out, to have an attribute hierarhcy, you need to have keys that cascade down, which you haven't got, at least yet.  One simple way around this is to use composite keys all the way down the hierarchy.  ie. State just has State as key,
    County has State and County as key, Town has State, County and Town in key etc.  I can assure you that this will make you calc much faster down the hierarchy.
    One side effect you will have is that attributes will now be unique based on their parents.  Two towns with the same name in different states or counties will appear as separate towns.  You may or may not want this.  If you don't want it,
    simply have two Town attributes, call one TownKey (with composite key) which will be invisible as an attribute but used in the hierarchy.  The other Town attribute simply has Town as the key, so it can be used as an attribute on its own.  Town attribute
    can be an attribute of TownKey. 
    Hope that makes sense,
    Richard

  • PASSING PARAMETER IN SQL STATEMENT .

    HI,
    Can any one tell me how to use on of the field name as a parameter in the same sql statement ? Here is what i am looking for :
    SELECT EMPNO, DEPTNO, (SELECT COUNT(ORDERNO) FROM ORDERS WHERE DEPTNO = :DEPTNO AND EMPNO = :EMPNO) TOTAL_ORDER FROM EMP;
    Here the embeded sql statment should take the paramter :DEPTNO , :EMPNO from the main sql statement. That means , each DEPTNO, EMPNO should be passed as a aparameter to the embeded SQL statement.
    Thanks
    Feroz

    WHATS THE CONACT, ||, +, HOW TO USE IT, CAN U GIVE ME AN EXAMPLE.
    SORRY , HERE IS THE ACTUAL THING WHAT I AM LOOKING FOR, I WANT TO GET THE MEDIAN AND MODE VALUE IN ORACLE, BUT COZ ORACLE DOES NOT HAVE IN BUILT FUNCTION TO ET THE ABOVE TOW , I WROTE MY SQL STATEMENTS, FOR EXAMPLE THE MEDIAN OF SAL FOR DEPT 20 IS IS
    SELECT AVG(SAL) FROM
    (SELECT RowNum The_Rownum, SAL FROM
    (SELECT SAL FROM EMP WHERE DEPTNO = 20 ORDER BY 1)) V
    WHERE V.The_Rownum = ( SELECT FLOOR((COUNT(SAL)+1)/2) FROM EMP WHERE DEPTNO = 20)
    OR V.the_rownum = (SELECT CEIL((count(SAL)/2) + 1/2) FROM EMP WHERE DEPTNO = 20)
    This median value ncalculation i can put in a functio and return it, but for a record os 1,800,000 volume, calling this function that many times, the sql never executes. It just hangs. so i thought if i can emabede the whole calculaton in the main sql statement instead of writing a function and calling that function in the sql statement. But the median calculation needs the department no as a parameter to calculate the median for that perticular department. Here , where the requirement of PARAMETER comes. ANY IDEA ???
    Thanks
    Feroz

  • Calculating Median in Lumira

    Hello Everyone,
    Have anyone been able to calculate median in Lumira? obviously the function is not listed, any workaround?
    Regards
    Mahmoud

    Thanks for the advise, I was thinking of calculating median in the excel sheet and work on the absolute values
    Regards
    Mahmoud

  • Does any one done median & mode calculations

    Hi all,
    Does anyone implemented in their projects median & mode statistical calculations ? please let me know your ideas.
    Can we achieve this without using ABAP in the routines ? Can we achieve this in BEx reporting itself ?
    Will assign the full points.
    Thanks in advance,
    GSM.

    Hi.
    Did you solve this issue?
    I'm having the same requeriment.
    thanks.

  • Calculating Median in Oracle

    Is it possible to build a function
    (accessible through SQL)
    which calculates the Median for a column
    which will be passed as the parameter ?
    null

    Rajat,
    You could use a group by function with this in the select statement...
    sum(<column>)/count(<column>)
    that will return the average.
    <BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by Rajat Ghosh ([email protected]):
    Is it possible to build a function
    (accessible through SQL)
    which calculates the Median for a column
    which will be passed as the parameter ?<HR></BLOCKQUOTE>
    null

  • Calculating Median

    Oracle does not have a median function (though it does have avg, mean, variance, standard deviation, etc.). Does anyone know how to calculate this?

    I am not very good in statistics but if I am correct the median is the value in the middle of a (ordered) range. If the range has an odd number of values it is the value in the middle (ex. 3 values than it is the second value) and if it has an even number of values than it is the average of the two middle values (ex. 4 values than it is the average of the second and third value).
    I think that you have to write a procedure that reads the ordered range until the middle value(s) are reached and return the value of the median.

  • Excluding detail and suppressed records from calculations in crystal xi

    Is there anyway to exclude records from calculations in crystal xi
    The report design contain group level A, group level B and group level C
    In Group level C - the sorting order ensures that the most recent (and in this scenario relevant record) is displayed first - this is the record which is required for the calculations.  This record is then moved into Group Level C header - thus only displaying the first record in this group. However any calculations which take place take into account all the detail records in Group Level C, and as a result the calculations are incorrect.
    Running Totals are not an option as also on this report - in certain scenarios Group Level C may be suppressed altogether - is there anyway to exclude suppressed records from the calculations?
    It is necessary to carry out the following calculations, using only the (unsuppressed) value from Group Header Leve C: Sum, Mean, Median
    Thank you in advance

    if i understand correctly you need to calcuate values based upon your group c
    and the details of the group are in the details section
    the only way you can accuratley calc this is MANUAL RUNNING TOTALS.
    RESET
    The reset formula is placed in a group header report header to reset the summary to zero for each unique record it groups by.
    whileprintingrecords;
    Numbervar  X := 0;
    CALCULATION
    The calculation is placed adjacent to the field or formula that is being calculated.
    (if there are duplicate values; create a group on the field that is being calculated on. If there are not duplicate records, the detail section is used.
    whileprintingrecords;
    Numbervar  X := x + ; ( or formula)
    DISPLAY
    The display is the sum of what is being calculated. This is placed in a group, page or report footer. (generally placed in the group footer of the group header where the reset is placed.)
    whileprintingrecords;
    Numbervar  X;
    X

  • "median count" in a single group by query

    Hallo following problem:
    i use a single group by query to analyze a data table.
    like "select avg(parameter1), sum(parameter2), count(case when...end) from datatable where ....".
    Following problem: I want a median of a count without rewriting the query completely, accessing the table several times or something.
    Easy example - in Detail:
    Create table and fill with example data
    Connected to:
    Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bit Production
    With the Partitioning, OLAP, Data Mining and Real Application Testing options
    SQL> CREATE TABLE datatable
      2  (
      3    SLOT NUMBER
      4  , DATA NUMBER
      5  );
    Table created.
    SQL> INSERT INTO datatable VALUES (1,1);
    1 row created.
    SQL> INSERT INTO datatable VALUES (1,2);
    1 row created.
    SQL> INSERT INTO datatable VALUES (1,3);
    1 row created.
    SQL> INSERT INTO datatable VALUES (1,4);
    1 row created.
    SQL> INSERT INTO datatable VALUES (1,5);
    1 row created.
    SQL> INSERT INTO datatable VALUES (2,1);
    1 row created.
    SQL> INSERT INTO datatable VALUES (3,1);
    1 row created.
    SQL> INSERT INTO datatable VALUES (3,2);
    1 row created.
    SQL> INSERT INTO datatable VALUES (3,3);
    1 row created.
    SQL> INSERT INTO datatable VALUES (3,4);
    1 row created.
    SQL> INSERT INTO datatable VALUES (3,5);
    1 row created.
    SQL> INSERT INTO datatable VALUES (4,1);
    1 row created.
    SQL> INSERT INTO datatable VALUES (4,2);
    1 row created.
    SQL> INSERT INTO datatable VALUES (4,3);
    1 row created.
    SQL> INSERT INTO datatable VALUES (4,4);
    1 row created.
    SQL> INSERT INTO datatable VALUES (4,5);
    1 row created.
    SQL> INSERT INTO datatable VALUES (5,1);
    1 row created.
    SQL> INSERT INTO datatable VALUES (5,2);
    1 row created.
    SQL> INSERT INTO datatable VALUES (5,3);
    1 row created.
    SQL> INSERT INTO datatable VALUES (5,4);
    1 row created.
    SQL> INSERT INTO datatable VALUES (5,5);
    1 row created.In the table there are several items (here slots) with a for each slot unique data-value.
    I want to have the median count of data values, to filter out slots with more or less values.
    this worked, until there where only slots with less data:
    SQL> SELECT FLOOR(COUNT(DISTINCT SLOT||DATA)/COUNT(DISTINCT DATA)) FROM datatabl
    e;
    FLOOR(COUNT(DISTINCTSLOT||DATA)/COUNT(DISTINCTDATA))
                                                       4but when there is a slot having more data - it won't work, the very simple and stupid calculation will give a too little value
    SQL>
    SQL> INSERT INTO datatable VALUES (4,6);
    1 row created.
    SQL>
    SQL> SELECT FLOOR(COUNT(DISTINCT SLOT||DATA)/COUNT(DISTINCT DATA)) FROM datatabl
    e;
    FLOOR(COUNT(DISTINCTSLOT||DATA)/COUNT(DISTINCTDATA))
                                                       3so what i would need is this:
    SQL>
    SQL> SELECT MEDIAN(count(DISTINCT SLOT) over (partition by DATA)) FROM datatable
    SELECT MEDIAN(count(DISTINCT SLOT) over (partition by DATA)) FROM datatable
    ERROR at line 1:
    ORA-30483: window  functions are not allowed hereIn detail:
    the count delivers the distinct count of slots for each data (possible duplicated entrys should not be counted)
    And I want the median, which should be 4.
    SQL> SELECT count(DISTINCT SLOT) over (partition by DATA) FROM datatable;
    COUNT(DISTINCTSLOT)OVER(PARTITIONBYDATA)
                                           5
                                           5
                                           5
                                           5
                                           5
                                           4
                                           4
                                           4
                                           4
                                           4
                                           4
                                           4
                                           4
                                           4
                                           4
                                           4
                                           4
                                           4
                                           4
                                           4
                                           4
    COUNT(DISTINCTSLOT)OVER(PARTITIONBYDATA)
                                           1
    22 rows selected.Is it -anyhow- possible to do this without rebuilding the whole query?
    Thanks a lot

    ok, an example:
      CREATE TABLE "DATATABLE"
       (     "TOOL" CHAR(5 BYTE),
         "SLOT" NUMBER,
         "LOTID" CHAR(4 BYTE),
         "STEP" VARCHAR2(44 BYTE),
         "ENDTIME" DATE,
         "PARAMETER1" NUMBER,
         "PARAMETER6" NUMBER
    Insert into DATATABLE  values ('TOOL1',-1,'LOT1','STEP1',to_timestamp('02-FEB-12 03.09.42 PM','DD-MON-RR HH.MI.SS AM'),1,0);
    Insert into DATATABLE  values ('TOOL1',-1,'LOT1','STEP2',to_timestamp('02-FEB-12 03.18.47 PM','DD-MON-RR HH.MI.SS AM'),42,0);
    Insert into DATATABLE  values ('TOOL1',-1,'LOT1','STEP3',to_timestamp('02-FEB-12 03.09.44 PM','DD-MON-RR HH.MI.SS AM'),1,0);
    Insert into DATATABLE  values ('TOOL1',-1,'LOT1','STEP4',to_timestamp('02-FEB-12 02.20.38 PM','DD-MON-RR HH.MI.SS AM'),1,0);
    Insert into DATATABLE  values ('TOOL1',-1,'LOT1','STEP5',to_timestamp('02-FEB-12 02.20.35 PM','DD-MON-RR HH.MI.SS AM'),1,0);
    Insert into DATATABLE  values ('TOOL1',1,'LOT1','STEP1',to_timestamp('02-FEB-12 01.51.28 PM','DD-MON-RR HH.MI.SS AM'),0,0);
    Insert into DATATABLE  values ('TOOL1',1,'LOT1','STEP2',to_timestamp('02-FEB-12 01.52.40 PM','DD-MON-RR HH.MI.SS AM'),1,0);
    Insert into DATATABLE  values ('TOOL1',1,'LOT1','STEP3',to_timestamp('02-FEB-12 01.54.20 PM','DD-MON-RR HH.MI.SS AM'),1,0);
    Insert into DATATABLE  values ('TOOL1',1,'LOT1','STEP4',to_timestamp('02-FEB-12 01.55.32 PM','DD-MON-RR HH.MI.SS AM'),1,0);
    Insert into DATATABLE  values ('TOOL1',1,'LOT1','STEP5',to_timestamp('02-FEB-12 01.56.36 PM','DD-MON-RR HH.MI.SS AM'),18,0);
    Insert into DATATABLE  values ('TOOL1',2,'LOT1','STEP1',to_timestamp('02-FEB-12 01.52.41 PM','DD-MON-RR HH.MI.SS AM'),0,0);
    Insert into DATATABLE  values ('TOOL1',3,'LOT1','STEP1',to_timestamp('02-FEB-12 02.00.29 PM','DD-MON-RR HH.MI.SS AM'),0,0);
    Insert into DATATABLE  values ('TOOL1',3,'LOT1','STEP2',to_timestamp('02-FEB-12 02.01.43 PM','DD-MON-RR HH.MI.SS AM'),1,0);
    Insert into DATATABLE  values ('TOOL1',3,'LOT1','STEP3',to_timestamp('02-FEB-12 02.03.23 PM','DD-MON-RR HH.MI.SS AM'),1,0);
    Insert into DATATABLE  values ('TOOL1',3,'LOT1','STEP4',to_timestamp('02-FEB-12 02.04.34 PM','DD-MON-RR HH.MI.SS AM'),1,0);
    Insert into DATATABLE  values ('TOOL1',3,'LOT1','STEP5',to_timestamp('02-FEB-12 02.05.40 PM','DD-MON-RR HH.MI.SS AM'),19,0);
    Insert into DATATABLE  values ('TOOL1',4,'LOT1','STEP1',to_timestamp('02-FEB-12 02.02.11 PM','DD-MON-RR HH.MI.SS AM'),0,0);
    Insert into DATATABLE  values ('TOOL1',4,'LOT1','STEP2',to_timestamp('02-FEB-12 02.03.26 PM','DD-MON-RR HH.MI.SS AM'),1,0);
    Insert into DATATABLE  values ('TOOL1',4,'LOT1','STEP3',to_timestamp('02-FEB-12 02.05.07 PM','DD-MON-RR HH.MI.SS AM'),1,0);
    Insert into DATATABLE  values ('TOOL1',4,'LOT1','STEP4',to_timestamp('02-FEB-12 02.06.19 PM','DD-MON-RR HH.MI.SS AM'),1,0);
    Insert into DATATABLE  values ('TOOL1',4,'LOT1','STEP5',to_timestamp('02-FEB-12 02.07.27 PM','DD-MON-RR HH.MI.SS AM'),20,0);
    Insert into DATATABLE  values ('TOOL1',5,'LOT1','STEP1',to_timestamp('02-FEB-12 02.03.54 PM','DD-MON-RR HH.MI.SS AM'),0,0);
    Insert into DATATABLE  values ('TOOL1',5,'LOT1','STEP2',to_timestamp('02-FEB-12 02.05.08 PM','DD-MON-RR HH.MI.SS AM'),1,0);
    Insert into DATATABLE  values ('TOOL1',5,'LOT1','STEP3',to_timestamp('02-FEB-12 02.06.49 PM','DD-MON-RR HH.MI.SS AM'),1,0);
    Insert into DATATABLE  values ('TOOL1',5,'LOT1','STEP4',to_timestamp('02-FEB-12 02.08.01 PM','DD-MON-RR HH.MI.SS AM'),1,0);
    Insert into DATATABLE  values ('TOOL1',5,'LOT1','STEP5',to_timestamp('02-FEB-12 02.14.26 PM','DD-MON-RR HH.MI.SS AM'),18,0);
    Insert into DATATABLE  values ('TOOL1',6,'LOT1','STEP1',to_timestamp('02-FEB-12 02.05.35 PM','DD-MON-RR HH.MI.SS AM'),0,0);
    Insert into DATATABLE  values ('TOOL1',6,'LOT1','STEP2',to_timestamp('02-FEB-12 02.06.50 PM','DD-MON-RR HH.MI.SS AM'),1,0);
    Insert into DATATABLE  values ('TOOL1',6,'LOT1','STEP3',to_timestamp('02-FEB-12 02.15.14 PM','DD-MON-RR HH.MI.SS AM'),1,0);
    Insert into DATATABLE  values ('TOOL1',6,'LOT1','STEP4',to_timestamp('02-FEB-12 02.16.26 PM','DD-MON-RR HH.MI.SS AM'),1,0);
    Insert into DATATABLE  values ('TOOL1',6,'LOT1','STEP5',to_timestamp('02-FEB-12 02.17.31 PM','DD-MON-RR HH.MI.SS AM'),19,0);
    Insert into DATATABLE  values ('TOOL1',7,'LOT1','STEP1',to_timestamp('02-FEB-12 02.06.42 PM','DD-MON-RR HH.MI.SS AM'),0,0);
    Insert into DATATABLE  values ('TOOL1',8,'LOT1','STEP1',to_timestamp('02-FEB-12 02.14.14 PM','DD-MON-RR HH.MI.SS AM'),0,0);
    Insert into DATATABLE  values ('TOOL1',8,'LOT1','STEP2',to_timestamp('02-FEB-12 02.15.29 PM','DD-MON-RR HH.MI.SS AM'),1,0);
    Insert into DATATABLE  values ('TOOL1',8,'LOT1','STEP3',to_timestamp('02-FEB-12 02.17.09 PM','DD-MON-RR HH.MI.SS AM'),1,0);
    Insert into DATATABLE  values ('TOOL1',8,'LOT1','STEP4',to_timestamp('02-FEB-12 02.18.22 PM','DD-MON-RR HH.MI.SS AM'),1,0);
    Insert into DATATABLE  values ('TOOL1',8,'LOT1','STEP5',to_timestamp('02-FEB-12 02.23.31 PM','DD-MON-RR HH.MI.SS AM'),18,0);
    Insert into DATATABLE  values ('TOOL1',9,'LOT1','STEP1',to_timestamp('02-FEB-12 02.58.14 PM','DD-MON-RR HH.MI.SS AM'),0,0);
    Insert into DATATABLE  values ('TOOL1',9,'LOT1','STEP2',to_timestamp('02-FEB-12 02.15.32 PM','DD-MON-RR HH.MI.SS AM'),0,0);
    Insert into DATATABLE  values ('TOOL1',9,'LOT1','STEP3',to_timestamp('02-FEB-12 02.59.30 PM','DD-MON-RR HH.MI.SS AM'),1,0);
    Insert into DATATABLE  values ('TOOL1',9,'LOT1','STEP4',to_timestamp('02-FEB-12 03.01.15 PM','DD-MON-RR HH.MI.SS AM'),1,0);
    Insert into DATATABLE  values ('TOOL1',9,'LOT1','STEP5',to_timestamp('02-FEB-12 03.07.52 PM','DD-MON-RR HH.MI.SS AM'),1,0);
    Insert into DATATABLE  values ('TOOL1',10,'LOT1','STEP1',to_timestamp('02-FEB-12 02.23.20 PM','DD-MON-RR HH.MI.SS AM'),0,0);
    Insert into DATATABLE  values ('TOOL1',10,'LOT1','STEP2',to_timestamp('02-FEB-12 02.24.39 PM','DD-MON-RR HH.MI.SS AM'),1,0);
    Insert into DATATABLE  values ('TOOL1',10,'LOT1','STEP3',to_timestamp('02-FEB-12 02.26.19 PM','DD-MON-RR HH.MI.SS AM'),1,0);
    Insert into DATATABLE  values ('TOOL1',10,'LOT1','STEP4',to_timestamp('02-FEB-12 02.27.30 PM','DD-MON-RR HH.MI.SS AM'),1,0);
    Insert into DATATABLE  values ('TOOL1',10,'LOT1','STEP5',to_timestamp('02-FEB-12 02.28.34 PM','DD-MON-RR HH.MI.SS AM'),17,0);
    Insert into DATATABLE  values ('TOOL1',11,'LOT1','STEP1',to_timestamp('02-FEB-12 02.59.37 PM','DD-MON-RR HH.MI.SS AM'),0,0);
    Insert into DATATABLE  values ('TOOL1',11,'LOT1','STEP2',to_timestamp('02-FEB-12 03.10.51 PM','DD-MON-RR HH.MI.SS AM'),0,0);
    Insert into DATATABLE  values ('TOOL1',11,'LOT1','STEP3',to_timestamp('02-FEB-12 02.24.52 PM','DD-MON-RR HH.MI.SS AM'),0,0);
    Insert into DATATABLE  values ('TOOL1',11,'LOT1','STEP4',to_timestamp('02-FEB-12 03.12.03 PM','DD-MON-RR HH.MI.SS AM'),1,0);
    Insert into DATATABLE  values ('TOOL1',11,'LOT1','STEP5',to_timestamp('02-FEB-12 03.13.41 PM','DD-MON-RR HH.MI.SS AM'),1,0);
    Insert into DATATABLE  values ('TOOL1',12,'LOT1','STEP1',to_timestamp('02-FEB-12 02.32.30 PM','DD-MON-RR HH.MI.SS AM'),0,0);
    Insert into DATATABLE  values ('TOOL1',12,'LOT1','STEP2',to_timestamp('02-FEB-12 02.33.43 PM','DD-MON-RR HH.MI.SS AM'),1,0);
    Insert into DATATABLE  values ('TOOL1',12,'LOT1','STEP3',to_timestamp('02-FEB-12 02.35.24 PM','DD-MON-RR HH.MI.SS AM'),1,0);
    Insert into DATATABLE  values ('TOOL1',12,'LOT1','STEP4',to_timestamp('02-FEB-12 02.36.35 PM','DD-MON-RR HH.MI.SS AM'),1,0);
    Insert into DATATABLE  values ('TOOL1',12,'LOT1','STEP5',to_timestamp('02-FEB-12 02.37.41 PM','DD-MON-RR HH.MI.SS AM'),18,0);
    Insert into DATATABLE  values ('TOOL1',13,'LOT1','STEP1',to_timestamp('02-FEB-12 02.34.11 PM','DD-MON-RR HH.MI.SS AM'),0,0);
    Insert into DATATABLE  values ('TOOL1',13,'LOT1','STEP2',to_timestamp('02-FEB-12 02.35.26 PM','DD-MON-RR HH.MI.SS AM'),1,0);
    Insert into DATATABLE  values ('TOOL1',13,'LOT1','STEP3',to_timestamp('02-FEB-12 02.37.06 PM','DD-MON-RR HH.MI.SS AM'),1,0);
    Insert into DATATABLE  values ('TOOL1',13,'LOT1','STEP4',to_timestamp('02-FEB-12 02.38.19 PM','DD-MON-RR HH.MI.SS AM'),1,0);
    Insert into DATATABLE  values ('TOOL1',13,'LOT1','STEP5',to_timestamp('02-FEB-12 02.39.29 PM','DD-MON-RR HH.MI.SS AM'),17,0);
    Insert into DATATABLE  values ('TOOL1',14,'LOT1','STEP1',to_timestamp('02-FEB-12 02.35.54 PM','DD-MON-RR HH.MI.SS AM'),0,0);
    Insert into DATATABLE  values ('TOOL1',14,'LOT1','STEP2',to_timestamp('02-FEB-12 02.37.08 PM','DD-MON-RR HH.MI.SS AM'),1,0);
    Insert into DATATABLE  values ('TOOL1',14,'LOT1','STEP3',to_timestamp('02-FEB-12 02.38.48 PM','DD-MON-RR HH.MI.SS AM'),1,0);
    Insert into DATATABLE  values ('TOOL1',14,'LOT1','STEP4',to_timestamp('02-FEB-12 02.40.01 PM','DD-MON-RR HH.MI.SS AM'),1,0);
    Insert into DATATABLE  values ('TOOL1',14,'LOT1','STEP5',to_timestamp('02-FEB-12 02.41.13 PM','DD-MON-RR HH.MI.SS AM'),13,0);
    Insert into DATATABLE  values ('TOOL1',15,'LOT1','STEP1',to_timestamp('02-FEB-12 02.37.37 PM','DD-MON-RR HH.MI.SS AM'),0,0);
    Insert into DATATABLE  values ('TOOL1',15,'LOT1','STEP2',to_timestamp('02-FEB-12 02.38.52 PM','DD-MON-RR HH.MI.SS AM'),1,0);
    Insert into DATATABLE  values ('TOOL1',15,'LOT1','STEP3',to_timestamp('02-FEB-12 02.40.33 PM','DD-MON-RR HH.MI.SS AM'),1,0);
    Insert into DATATABLE  values ('TOOL1',15,'LOT1','STEP4',to_timestamp('02-FEB-12 02.41.46 PM','DD-MON-RR HH.MI.SS AM'),1,0);
    Insert into DATATABLE  values ('TOOL1',15,'LOT1','STEP5',to_timestamp('02-FEB-12 02.42.58 PM','DD-MON-RR HH.MI.SS AM'),17,0);
    Insert into DATATABLE  values ('TOOL1',16,'LOT1','STEP1',to_timestamp('02-FEB-12 02.39.20 PM','DD-MON-RR HH.MI.SS AM'),0,0);
    Insert into DATATABLE  values ('TOOL1',16,'LOT1','STEP2',to_timestamp('02-FEB-12 02.40.34 PM','DD-MON-RR HH.MI.SS AM'),1,0);
    Insert into DATATABLE  values ('TOOL1',16,'LOT1','STEP3',to_timestamp('02-FEB-12 02.42.16 PM','DD-MON-RR HH.MI.SS AM'),1,0);
    Insert into DATATABLE  values ('TOOL1',16,'LOT1','STEP4',to_timestamp('02-FEB-12 02.43.29 PM','DD-MON-RR HH.MI.SS AM'),1,0);
    Insert into DATATABLE  values ('TOOL1',16,'LOT1','STEP5',to_timestamp('02-FEB-12 02.44.42 PM','DD-MON-RR HH.MI.SS AM'),15,0);
    Insert into DATATABLE  values ('TOOL1',17,'LOT1','STEP1',to_timestamp('02-FEB-12 02.41.04 PM','DD-MON-RR HH.MI.SS AM'),0,0);
    Insert into DATATABLE  values ('TOOL1',17,'LOT1','STEP2',to_timestamp('02-FEB-12 02.42.19 PM','DD-MON-RR HH.MI.SS AM'),1,0);
    Insert into DATATABLE  values ('TOOL1',17,'LOT1','STEP3',to_timestamp('02-FEB-12 02.43.59 PM','DD-MON-RR HH.MI.SS AM'),1,0);
    Insert into DATATABLE  values ('TOOL1',17,'LOT1','STEP4',to_timestamp('02-FEB-12 02.45.13 PM','DD-MON-RR HH.MI.SS AM'),1,0);
    Insert into DATATABLE  values ('TOOL1',17,'LOT1','STEP5',to_timestamp('02-FEB-12 02.46.26 PM','DD-MON-RR HH.MI.SS AM'),13,0);
    Insert into DATATABLE  values ('TOOL1',18,'LOT1','STEP1',to_timestamp('02-FEB-12 02.42.49 PM','DD-MON-RR HH.MI.SS AM'),0,0);
    Insert into DATATABLE  values ('TOOL1',18,'LOT1','STEP2',to_timestamp('02-FEB-12 02.44.03 PM','DD-MON-RR HH.MI.SS AM'),1,0);
    Insert into DATATABLE  values ('TOOL1',18,'LOT1','STEP3',to_timestamp('02-FEB-12 02.45.44 PM','DD-MON-RR HH.MI.SS AM'),1,0);
    Insert into DATATABLE  values ('TOOL1',18,'LOT1','STEP4',to_timestamp('02-FEB-12 02.47.01 PM','DD-MON-RR HH.MI.SS AM'),1,0);
    Insert into DATATABLE  values ('TOOL1',18,'LOT1','STEP5',to_timestamp('02-FEB-12 02.48.10 PM','DD-MON-RR HH.MI.SS AM'),18,0);
    Insert into DATATABLE  values ('TOOL1',19,'LOT1','STEP1',to_timestamp('02-FEB-12 02.44.33 PM','DD-MON-RR HH.MI.SS AM'),0,0);
    Insert into DATATABLE  values ('TOOL1',19,'LOT1','STEP2',to_timestamp('02-FEB-12 02.45.47 PM','DD-MON-RR HH.MI.SS AM'),1,0);
    Insert into DATATABLE  values ('TOOL1',19,'LOT1','STEP3',to_timestamp('02-FEB-12 02.47.31 PM','DD-MON-RR HH.MI.SS AM'),1,0);
    Insert into DATATABLE  values ('TOOL1',19,'LOT1','STEP4',to_timestamp('02-FEB-12 02.48.45 PM','DD-MON-RR HH.MI.SS AM'),1,0);
    Insert into DATATABLE  values ('TOOL1',19,'LOT1','STEP5',to_timestamp('02-FEB-12 02.49.58 PM','DD-MON-RR HH.MI.SS AM'),14,0);
    Insert into DATATABLE  values ('TOOL1',20,'LOT1','STEP1',to_timestamp('02-FEB-12 02.46.17 PM','DD-MON-RR HH.MI.SS AM'),0,0);
    Insert into DATATABLE  values ('TOOL1',20,'LOT1','STEP2',to_timestamp('02-FEB-12 02.47.31 PM','DD-MON-RR HH.MI.SS AM'),1,0);
    Insert into DATATABLE  values ('TOOL1',20,'LOT1','STEP3',to_timestamp('02-FEB-12 02.49.16 PM','DD-MON-RR HH.MI.SS AM'),1,0);
    Insert into DATATABLE  values ('TOOL1',20,'LOT1','STEP4',to_timestamp('02-FEB-12 02.50.31 PM','DD-MON-RR HH.MI.SS AM'),1,0);
    Insert into DATATABLE  values ('TOOL1',20,'LOT1','STEP5',to_timestamp('02-FEB-12 02.51.42 PM','DD-MON-RR HH.MI.SS AM'),14,0);
    Insert into DATATABLE  values ('TOOL1',21,'LOT1','STEP1',to_timestamp('02-FEB-12 02.48.01 PM','DD-MON-RR HH.MI.SS AM'),0,0);
    Insert into DATATABLE  values ('TOOL1',21,'LOT1','STEP2',to_timestamp('02-FEB-12 02.49.16 PM','DD-MON-RR HH.MI.SS AM'),1,0);
    Insert into DATATABLE  values ('TOOL1',21,'LOT1','STEP3',to_timestamp('02-FEB-12 02.51.02 PM','DD-MON-RR HH.MI.SS AM'),1,0);
    Insert into DATATABLE  values ('TOOL1',21,'LOT1','STEP4',to_timestamp('02-FEB-12 02.52.16 PM','DD-MON-RR HH.MI.SS AM'),1,0);
    Insert into DATATABLE  values ('TOOL1',21,'LOT1','STEP5',to_timestamp('02-FEB-12 02.55.04 PM','DD-MON-RR HH.MI.SS AM'),19,0);
    Insert into DATATABLE  values ('TOOL1',22,'LOT1','STEP1',to_timestamp('02-FEB-12 02.49.48 PM','DD-MON-RR HH.MI.SS AM'),0,0);
    Insert into DATATABLE  values ('TOOL1',22,'LOT1','STEP2',to_timestamp('02-FEB-12 02.51.02 PM','DD-MON-RR HH.MI.SS AM'),1,0);
    Insert into DATATABLE  values ('TOOL1',22,'LOT1','STEP3',to_timestamp('02-FEB-12 02.52.47 PM','DD-MON-RR HH.MI.SS AM'),1,0);
    Insert into DATATABLE  values ('TOOL1',22,'LOT1','STEP4',to_timestamp('02-FEB-12 02.55.39 PM','DD-MON-RR HH.MI.SS AM'),1,0);
    Insert into DATATABLE  values ('TOOL1',22,'LOT1','STEP5',to_timestamp('02-FEB-12 02.56.45 PM','DD-MON-RR HH.MI.SS AM'),15,0);
    Insert into DATATABLE  values ('TOOL1',23,'LOT1','STEP1',to_timestamp('02-FEB-12 02.51.33 PM','DD-MON-RR HH.MI.SS AM'),0,0);
    Insert into DATATABLE  values ('TOOL1',23,'LOT1','STEP2',to_timestamp('02-FEB-12 02.52.48 PM','DD-MON-RR HH.MI.SS AM'),1,0);
    Insert into DATATABLE  values ('TOOL1',23,'LOT1','STEP3',to_timestamp('02-FEB-12 02.56.11 PM','DD-MON-RR HH.MI.SS AM'),1,0);
    Insert into DATATABLE  values ('TOOL1',23,'LOT1','STEP4',to_timestamp('02-FEB-12 02.57.23 PM','DD-MON-RR HH.MI.SS AM'),1,0);
    Insert into DATATABLE  values ('TOOL1',23,'LOT1','STEP5',to_timestamp('02-FEB-12 02.58.29 PM','DD-MON-RR HH.MI.SS AM'),18,0);
    Insert into DATATABLE  values ('TOOL1',24,'LOT1','STEP1',to_timestamp('02-FEB-12 02.53.18 PM','DD-MON-RR HH.MI.SS AM'),0,0);
    Insert into DATATABLE  values ('TOOL1',24,'LOT1','STEP2',to_timestamp('02-FEB-12 02.56.00 PM','DD-MON-RR HH.MI.SS AM'),1,0);
    Insert into DATATABLE  values ('TOOL1',24,'LOT1','STEP3',to_timestamp('02-FEB-12 02.57.53 PM','DD-MON-RR HH.MI.SS AM'),1,0);
    Insert into DATATABLE  values ('TOOL1',24,'LOT1','STEP4',to_timestamp('02-FEB-12 02.59.05 PM','DD-MON-RR HH.MI.SS AM'),1,0);
    Insert into DATATABLE  values ('TOOL1',24,'LOT1','STEP5',to_timestamp('02-FEB-12 03.00.12 PM','DD-MON-RR HH.MI.SS AM'),17,0);
    Insert into DATATABLE  values ('TOOL1',25,'LOT1','STEP1',to_timestamp('02-FEB-12 02.56.29 PM','DD-MON-RR HH.MI.SS AM'),0,0);
    Insert into DATATABLE  values ('TOOL1',25,'LOT1','STEP2',to_timestamp('02-FEB-12 02.57.44 PM','DD-MON-RR HH.MI.SS AM'),1,0);
    Insert into DATATABLE  values ('TOOL1',25,'LOT1','STEP3',to_timestamp('02-FEB-12 02.59.35 PM','DD-MON-RR HH.MI.SS AM'),1,0);
    Insert into DATATABLE  values ('TOOL1',25,'LOT1','STEP4',to_timestamp('02-FEB-12 03.00.46 PM','DD-MON-RR HH.MI.SS AM'),1,0);
    Insert into DATATABLE  values ('TOOL1',25,'LOT1','STEP5',to_timestamp('02-FEB-12 03.07.19 PM','DD-MON-RR HH.MI.SS AM'),18,0);
    Insert into DATATABLE  values ('TOOL1',-1,'LOT2','STEP1',to_timestamp('24-FEB-12 03.19.26 AM','DD-MON-RR HH.MI.SS AM'),1,0);
    Insert into DATATABLE  values ('TOOL1',1,'LOT2','STEP1',to_timestamp('24-FEB-12 03.00.47 AM','DD-MON-RR HH.MI.SS AM'),1,0);
    Insert into DATATABLE  values ('TOOL1',1,'LOT2','STEP2',to_timestamp('24-FEB-12 03.02.56 AM','DD-MON-RR HH.MI.SS AM'),1,0);
    Insert into DATATABLE  values ('TOOL1',1,'LOT2','STEP3',to_timestamp('24-FEB-12 03.03.56 AM','DD-MON-RR HH.MI.SS AM'),19,0);
    Insert into DATATABLE  values ('TOOL1',2,'LOT2','STEP1',to_timestamp('24-FEB-12 03.02.22 AM','DD-MON-RR HH.MI.SS AM'),1,0);
    Insert into DATATABLE  values ('TOOL1',2,'LOT2','STEP2',to_timestamp('24-FEB-12 03.05.06 AM','DD-MON-RR HH.MI.SS AM'),1,0);
    Insert into DATATABLE  values ('TOOL1',2,'LOT2','STEP3',to_timestamp('24-FEB-12 03.06.06 AM','DD-MON-RR HH.MI.SS AM'),18,0);
    Insert into DATATABLE  values ('TOOL1',3,'LOT2','STEP1',to_timestamp('24-FEB-12 03.03.56 AM','DD-MON-RR HH.MI.SS AM'),1,0);
    Insert into DATATABLE  values ('TOOL1',3,'LOT2','STEP2',to_timestamp('24-FEB-12 03.07.15 AM','DD-MON-RR HH.MI.SS AM'),1,0);
    Insert into DATATABLE  values ('TOOL1',3,'LOT2','STEP3',to_timestamp('24-FEB-12 03.13.53 AM','DD-MON-RR HH.MI.SS AM'),19,0);
    Insert into DATATABLE  values ('TOOL1',4,'LOT2','STEP1',to_timestamp('24-FEB-12 03.05.54 AM','DD-MON-RR HH.MI.SS AM'),1,0);
    Insert into DATATABLE  values ('TOOL1',4,'LOT2','STEP2',to_timestamp('24-FEB-12 03.15.03 AM','DD-MON-RR HH.MI.SS AM'),1,0);
    Insert into DATATABLE  values ('TOOL1',4,'LOT2','STEP3',to_timestamp('24-FEB-12 03.16.04 AM','DD-MON-RR HH.MI.SS AM'),18,0);
    Insert into DATATABLE  values ('TOOL1',5,'LOT2','STEP1',to_timestamp('24-FEB-12 03.05.58 AM','DD-MON-RR HH.MI.SS AM'),0,0);
    Insert into DATATABLE  values ('TOOL1',5,'LOT2','STEP2',to_timestamp('24-FEB-12 03.25.35 AM','DD-MON-RR HH.MI.SS AM'),1,0);
    Insert into DATATABLE  values ('TOOL1',5,'LOT2','STEP3',to_timestamp('24-FEB-12 03.29.56 AM','DD-MON-RR HH.MI.SS AM'),1,0);
    Insert into DATATABLE  values ('TOOL1',5,'LOT2','STEP4',to_timestamp('24-FEB-12 03.30.57 AM','DD-MON-RR HH.MI.SS AM'),16,0);
    Insert into DATATABLE  values ('TOOL1',6,'LOT2','STEP1',to_timestamp('24-FEB-12 03.14.18 AM','DD-MON-RR HH.MI.SS AM'),1,0);
    Insert into DATATABLE  values ('TOOL1',6,'LOT2','STEP2',to_timestamp('24-FEB-12 03.17.13 AM','DD-MON-RR HH.MI.SS AM'),1,0);
    Insert into DATATABLE  values ('TOOL1',6,'LOT2','STEP3',to_timestamp('24-FEB-12 03.19.55 AM','DD-MON-RR HH.MI.SS AM'),18,0);
    Insert into DATATABLE  values ('TOOL1',7,'LOT2','STEP1',to_timestamp('24-FEB-12 03.15.51 AM','DD-MON-RR HH.MI.SS AM'),1,0);
    Insert into DATATABLE  values ('TOOL1',7,'LOT2','STEP2',to_timestamp('24-FEB-12 03.21.18 AM','DD-MON-RR HH.MI.SS AM'),1,0);
    Insert into DATATABLE  values ('TOOL1',7,'LOT2','STEP3',to_timestamp('24-FEB-12 03.22.19 AM','DD-MON-RR HH.MI.SS AM'),19,0);
    Insert into DATATABLE  values ('TOOL1',8,'LOT2','STEP1',to_timestamp('24-FEB-12 03.17.50 AM','DD-MON-RR HH.MI.SS AM'),1,0);
    Insert into DATATABLE  values ('TOOL1',8,'LOT2','STEP2',to_timestamp('24-FEB-12 03.23.28 AM','DD-MON-RR HH.MI.SS AM'),1,0);
    Insert into DATATABLE  values ('TOOL1',8,'LOT2','STEP3',to_timestamp('24-FEB-12 03.24.29 AM','DD-MON-RR HH.MI.SS AM'),18,0);
    Insert into DATATABLE  values ('TOOL1',9,'LOT2','STEP1',to_timestamp('24-FEB-12 03.21.42 AM','DD-MON-RR HH.MI.SS AM'),1,0);
    Insert into DATATABLE  values ('TOOL1',9,'LOT2','STEP2',to_timestamp('24-FEB-12 03.25.37 AM','DD-MON-RR HH.MI.SS AM'),1,0);
    Insert into DATATABLE  values ('TOOL1',9,'LOT2','STEP3',to_timestamp('24-FEB-12 03.26.38 AM','DD-MON-RR HH.MI.SS AM'),19,0);
    Insert into DATATABLE  values ('TOOL1',10,'LOT2','STEP1',to_timestamp('24-FEB-12 03.23.25 AM','DD-MON-RR HH.MI.SS AM'),1,0);
    Insert into DATATABLE  values ('TOOL1',10,'LOT2','STEP2',to_timestamp('24-FEB-12 03.27.47 AM','DD-MON-RR HH.MI.SS AM'),1,0);
    Insert into DATATABLE  values ('TOOL1',10,'LOT2','STEP3',to_timestamp('24-FEB-12 03.28.47 AM','DD-MON-RR HH.MI.SS AM'),19,0);
    Insert into DATATABLE  values ('TOOL1',11,'LOT2','STEP1',to_timestamp('24-FEB-12 03.27.44 AM','DD-MON-RR HH.MI.SS AM'),1,0);
    Insert into DATATABLE  values ('TOOL1',11,'LOT2','STEP2',to_timestamp('24-FEB-12 03.32.06 AM','DD-MON-RR HH.MI.SS AM'),1,0);
    Insert into DATATABLE  values ('TOOL1',11,'LOT2','STEP3',to_timestamp('24-FEB-12 03.33.07 AM','DD-MON-RR HH.MI.SS AM'),18,0);
    Insert into DATATABLE  values ('TOOL1',12,'LOT2','STEP1',to_timestamp('24-FEB-12 03.29.54 AM','DD-MON-RR HH.MI.SS AM'),1,0);
    Insert into DATATABLE  values ('TOOL1',12,'LOT2','STEP2',to_timestamp('24-FEB-12 03.34.16 AM','DD-MON-RR HH.MI.SS AM'),1,0);
    Insert into DATATABLE  values ('TOOL1',12,'LOT2','STEP3',to_timestamp('24-FEB-12 03.35.17 AM','DD-MON-RR HH.MI.SS AM'),18,0);
    Insert into DATATABLE  values ('TOOL1',13,'LOT2','STEP1',to_timestamp('24-FEB-12 03.32.04 AM','DD-MON-RR HH.MI.SS AM'),1,0);
    Insert into DATATABLE  values ('TOOL1',13,'LOT2','STEP2',to_timestamp('24-FEB-12 03.36.26 AM','DD-MON-RR HH.MI.SS AM'),1,0);
    Insert into DATATABLE  values ('TOOL1',13,'LOT2','STEP3',to_timestamp('24-FEB-12 03.37.27 AM','DD-MON-RR HH.MI.SS AM'),19,0);
    Insert into DATATABLE  values ('TOOL1',14,'LOT2','STEP1',to_timestamp('24-FEB-12 03.34.14 AM','DD-MON-RR HH.MI.SS AM'),1,0);
    Insert into DATATABLE  values ('TOOL1',14,'LOT2','STEP2',to_timestamp('24-FEB-12 03.38.36 AM','DD-MON-RR HH.MI.SS AM'),1,0);
    Insert into DATATABLE  values ('TOOL1',14,'LOT2','STEP3',to_timestamp('24-FEB-12 03.39.37 AM','DD-MON-RR HH.MI.SS AM'),19,0);
    Insert into DATATABLE  values ('TOOL1',15,'LOT2','STEP1',to_timestamp('24-FEB-12 03.36.24 AM','DD-MON-RR HH.MI.SS AM'),1,0);
    Insert into DATATABLE  values ('TOOL1',15,'LOT2','STEP2',to_timestamp('24-FEB-12 03.40.46 AM','DD-MON-RR HH.MI.SS AM'),1,0);
    Insert into DATATABLE  values ('TOOL1',15,'LOT2','STEP3',to_timestamp('24-FEB-12 03.41.46 AM','DD-MON-RR HH.MI.SS AM'),18,0);
    Insert into DATATABLE  values ('TOOL1',16,'LOT2','STEP1',to_timestamp('24-FEB-12 03.38.34 AM','DD-MON-RR HH.MI.SS AM'),1,0);
    Insert into DATATABLE  values ('TOOL1',16,'LOT2','STEP2',to_timestamp('24-FEB-12 03.42.55 AM','DD-MON-RR HH.MI.SS AM'),1,0);
    Insert into DATATABLE  values ('TOOL1',16,'LOT2','STEP3',to_timestamp('24-FEB-12 03.43.56 AM','DD-MON-RR HH.MI.SS AM'),19,0);
    Insert into DATATABLE  values ('TOOL1',17,'LOT2','STEP1',to_timestamp('24-FEB-12 03.40.43 AM','DD-MON-RR HH.MI.SS AM'),1,0);
    Insert into DATATABLE  values ('TOOL1',17,'LOT2','STEP2',to_timestamp('24-FEB-12 03.45.05 AM','DD-MON-RR HH.MI.SS AM'),1,0);
    Insert into DATATABLE  values ('TOOL1',17,'LOT2','STEP3',to_timestamp('24-FEB-12 03.46.06 AM','DD-MON-RR HH.MI.SS AM'),17,0);
    Insert into DATATABLE  values ('TOOL1',18,'LOT2','STEP1',to_timestamp('24-FEB-12 03.42.53 AM','DD-MON-RR HH.MI.SS AM'),1,0);
    Insert into DATATABLE  values ('TOOL1',18,'LOT2','STEP2',to_timestamp('24-FEB-12 03.47.15 AM','DD-MON-RR HH.MI.SS AM'),1,0);
    Insert into DATATABLE  values ('TOOL1',18,'LOT2','STEP3',to_timestamp('24-FEB-12 03.48.16 AM','DD-MON-RR HH.MI.SS AM'),18,0);
    Insert into DATATABLE  values ('TOOL1',19,'LOT2','STEP1',to_timestamp('24-FEB-12 03.45.03 AM','DD-MON-RR HH.MI.SS AM'),1,0);
    Insert into DATATABLE  values ('TOOL1',19,'LOT2','STEP2',to_timestamp('24-FEB-12 03.49.25 AM','DD-MON-RR HH.MI.SS AM'),1,0);
    Insert into DATATABLE  values ('TOOL1',19,'LOT2','STEP3',to_timestamp('24-FEB-12 03.50.26 AM','DD-MON-RR HH.MI.SS AM'),18,0);
    Insert into DATATABLE  values ('TOOL1',20,'LOT2','STEP1',to_timestamp('24-FEB-12 03.47.13 AM','DD-MON-RR HH.MI.SS AM'),1,0);
    Insert into DATATABLE  values ('TOOL1',20,'LOT2','STEP2',to_timestamp('24-FEB-12 03.51.34 AM','DD-MON-RR HH.MI.SS AM'),1,0);
    Insert into DATATABLE  values ('TOOL1',20,'LOT2','STEP3',to_timestamp('24-FEB-12 03.52.35 AM','DD-MON-RR HH.MI.SS AM'),18,0);
    Insert into DATATABLE  values ('TOOL1',21,'LOT2','STEP1',to_timestamp('24-FEB-12 03.49.22 AM','DD-MON-RR HH.MI.SS AM'),1,0);
    Insert into DATATABLE  values ('TOOL1',21,'LOT2','STEP2',to_timestamp('24-FEB-12 03.53.44 AM','DD-MON-RR HH.MI.SS AM'),1,0);
    Insert into DATATABLE  values ('TOOL1',21,'LOT2','STEP3',to_timestamp('24-FEB-12 03.54.45 AM','DD-MON-RR HH.MI.SS AM'),18,0);
    Insert into DATATABLE  values ('TOOL1',22,'LOT2','STEP1',to_timestamp('24-FEB-12 03.51.32 AM','DD-MON-RR HH.MI.SS AM'),1,0);
    Insert into DATATABLE  values ('TOOL1',22,'LOT2','STEP2',to_timestamp('24-FEB-12 03.55.54 AM','DD-MON-RR HH.MI.SS AM'),1,0);
    Insert into DATATABLE  values ('TOOL1',22,'LOT2','STEP3',to_timestamp('24-FEB-12 03.56.55 AM','DD-MON-RR HH.MI.SS AM'),18,0);
    Insert into DATATABLE  values ('TOOL1',23,'LOT2','STEP1',to_timestamp('24-FEB-12 03.53.42 AM','DD-MON-RR HH.MI.SS AM'),1,0);
    Insert into DATATABLE  values ('TOOL1',23,'LOT2','STEP2',to_timestamp('24-FEB-12 03.58.03 AM','DD-MON-RR HH.MI.SS AM'),1,0);
    Insert into DATATABLE  values ('TOOL1',23,'LOT2','STEP3',to_timestamp('24-FEB-12 03.59.04 AM','DD-MON-RR HH.MI.SS AM'),19,0);
    Insert into DATATABLE  values ('TOOL1',24,'LOT2','STEP1',to_timestamp('24-FEB-12 03.55.51 AM','DD-MON-RR HH.MI.SS AM'),1,0);
    Insert into DATATABLE  values ('TOOL1',24,'LOT2','STEP2',to_timestamp('24-FEB-12 04.00.14 AM','DD-MON-RR HH.MI.SS AM'),1,0);
    Insert into DATATABLE  values ('TOOL1',24,'LOT2','STEP3',to_timestamp('24-FEB-12 04.01.15 AM','DD-MON-RR HH.MI.SS AM'),18,0);
    Insert into DATATABLE  values ('TOOL1',25,'LOT2','STEP1',to_timestamp('24-FEB-12 03.58.01 AM','DD-MON-RR HH.MI.SS AM'),1,0);
    Insert into DATATABLE  values ('TOOL1',25,'LOT2','STEP2',to_timestamp('24-FEB-12 04.02.23 AM','DD-MON-RR HH.MI.SS AM'),1,0);
    Insert into DATATABLE  values ('TOOL1',25,'LOT2','STEP3',to_timestamp('24-FEB-12 04.03.24 AM','DD-MON-RR HH.MI.SS AM'),18,0);(code generated by sqldeveloper)
    In the example:
    LOT1 has two slot, with only 1 step instead of 5 --> these slots should not be counted --> result 23
    LOT2 has one slot, with 4 instead of 3 --> this slot is ok and should be counted --> result 25
    as previously mentioned, i want to count all slots, which got at least the median amount of steps [edit: slot -1 should also not be counted]
    LOT1:
        SELECT
          sum(CASE WHEN SLOT != -1 THEN parameter1 END) parameter1,
          min(CASE WHEN SLOT != -1 THEN EndTime END) first_time,
          max(CASE WHEN SLOT != -1 THEN EndTime END) last_time,
          sum(CASE WHEN SLOT != -1 THEN parameter6 END) parameter6,
          CASE WHEN count(DISTINCT CASE WHEN SLOT != -1 THEN SLOT END) > 0 AND ROUND(count(DISTINCT CASE WHEN SLOT != -1 THEN SLOT||STEP END)/count(DISTINCT CASE WHEN SLOT != -1 THEN SLOT END)) > 0 THEN FLOOR(count(DISTINCT CASE WHEN SLOT != -1 THEN SLOT||STEP END)/ROUND(count(DISTINCT CASE WHEN SLOT != -1 THEN SLOT||STEP END)/count(DISTINCT CASE WHEN SLOT != -1 THEN SLOT END))) ELSE NULL END num_slots,
          sum(CASE WHEN SLOT = -1 THEN parameter1 END) minusone_parameter1,
          min(CASE WHEN SLOT = -1 THEN EndTime END) minusone_first_time,
          max(CASE WHEN SLOT = -1 THEN EndTime END) minusone_last_time,
          sum(CASE WHEN SLOT = -1 THEN parameter6 END) minusone_parameter6,
          count(CASE WHEN SLOT = -1 THEN 1 END) num_minusone
        FROM
          datatable
      WHERE
        tool = 'TOOL1'
        AND lotid = 'LOT1';
    PARAMETER1             FIRST_TIME                LAST_TIME                 PARAMETER6             *NUM_SLOTS*              MINUSONE_PARAMETER1    MINUSONE_FIRST_TIME       MINUSONE_LAST_TIME        MINUSONE_PARAMETER6    NUM_MINUSONE          
    423                    02.02.12 13:51:28         02.02.12 15:13:41         0                      *23*                     46                     02.02.12 14:20:35         02.02.12 15:18:47         0                      5                      this is the desired result
    same query with Lot2:
    PARAMETER1             FIRST_TIME                LAST_TIME                 PARAMETER6             *NUM_SLOTS*              MINUSONE_PARAMETER1    MINUSONE_FIRST_TIME       MINUSONE_LAST_TIME        MINUSONE_PARAMETER6    NUM_MINUSONE          
    506                    24.02.12 03:00:47         24.02.12 04:03:24         0                      *25*                     1                      24.02.12 03:19:26         24.02.12 03:19:26         0                      1                      so right now i get the desired results with this ugly query... but with combinations of several different conditions - e.g. several slots with more steps and a few with less... - it may not work.
    Edited by: Paneologist on Feb 24, 2012 7:42 AM

  • How to apply a 'calculated' radius in Unsharp Mask en mass?

    In about a week's time, when I've finished applying Curves to about 1200 B&W images, I'll be ready to apply an Unsharp Mask to each of them. Exactly how I'll do that I'm not certain yet, but I've been reading my Photoshop CS Bible (Deke McClelland) in preparation. On page 503 it states:
    If you're looking for a simple formula, I recommend 0.1 of Radius for every 15 ppi of final image resolution... If you have a calculator, just divide the intended resolution by 150 to get the ideal Radius value.
    For example, at 300 ppi use Radius = 2. Such a recommendation is just that: a recommendation (and not 'ideal' as he also states), but I've taken it as a good starting point; and while I've been adding Curves I have also been experimenting with Unsharp Mask and various Radii (but not yet saving the sharpened images).
    McClelland's statement is not clear regarding what Radius should be used if you are NOT working on the image at final resolution. I think I know what the answer is, but I want to confirm.
    Some background: I'll be printing on a Xerox iGen running a colour line screen at 175 lpi. The printer wants the images to be 300 ppi. The images at the moment range from an effective ppi of about 100 to 2000, depending on how much they have been scaled in InDesign. So I've got resolutions all over the place which at some point I will have to tidy up. Those images below about 250 ppi, I will be upsampling to 300. Those above about 450 ppi (this may change), will be downsampled to 300 when I convert to PDF.
    I have some questions:
    QUES 1
    Say I have an image at 1200 ppi, that will be downsampled to 300 ppi. Should I do the sharpening on the 1200 ppi image, or on the downsampled 300 ppi image? i.e Will it make any difference to the final printed result if sharpening is done before or after downsampling?
    QUES 2
    I think the statement:
    I recommend 0.1 of Radius for every 15 ppi of final image resolution
    should read
    I recommend 0.1 of Radius for every 15 ppi of image resolution
    Surely the Radius (assuming you accept the figures McClelland gives) depends only on the resolution of the image you are working on. i.e if you have a 1500 ppi image, use a Radius of 10 (1500/150), NOT a Radius of 2 (300/150) -- the final image resolution that is sent to the printer. Is that a correct reading of McClelland's recommendation?
    QUES 3
    My experiments indicate that for the type of images I am using, McClelland's recommendation oversharpens, at least for my liking. I will probably use half the figure he suggests: Radius = 1 for 300 ppi.
    Given that I have about 1200 images, if I was going to apply an Unsharp Mask manually this is what I would do:
    1. Put all the layers in each image into a Group.
    2. Calculate the Radius to be applied to each image from the formula: Radius = (IMAGE PPI) /300.
    3. Apply an Unsharp Mask to the Group using the calculated Radius (plus Amount = 50, Threshhold = 0)
    Of course I'm not going to do this manually -- well, I hope I'm not -- but what is the best way? Could an Action handle all of this? A Script? A combination of both? Something else entirely? Not possible in PS?
    In summary: I want to automatically apply a variable Radius that depends on the image's resolution. Possible?

    The PDF says, for one of the steps:
    Command-click the duplicate channel to make the edge mask a selection.
    When I do that, a selection outline appears, but I can't work out, or find out, what conditions are applied to make the selection. Any ideas? I may have to start a separate thread for this question. I don't like to blindly follow recipes. I like to know what's going on.
    Guy,
    I'm not sure I understand your question. With command click, the channel is the selection. White = fully selected, black = not selected. It's all the steps made to create the channel that affect the selection. To me the selection edges are visually interfering with a soft mask, I usually hide the edges.
    In post 9 steps 2-6 all contribute to the final section. Find edges identifies the edges. Median has a smoothing effect. Maximum expands the selection a little, then the gaussian blur softens it.
    This process (post 9) works for me when I sharpen images, but you may not like it. Sometimes no mask at all is a viable option - some folks like a grainy/noisy appearance in non-edge areas. Some people may even purposefully add noise to create that kind of look.
    With USM the radius thickens the light and dark areas of edges, and amount intensifies (lightening the light, darkening the dark). Threshold is just what it's  name implies, it sets a parameter for Ps to apply the sharpening or not (but it can result in a pockmarked look in smooth areas, so I like 0)
    I always look at images at actual pixels in Ps when sharpening. With sharpening there is room for opinion. Some people like thicker edges (higher radius). Some people go easy on the amount, some people are more aggressive.
    It's the scaling in ID that makes things difficult, because actual pixels won't give you a true print appearance. To correct this the image either needs to be scaled to size in PS, and placed at 100% in ID - OR left as is in ID, and the resolution changed in PS (300 x % i.e. 300 x 25% = 75 PPI)
    I like to start with radius 1 and 100 amount but these values are always subject to change. I wish it was an exact science but it's not. I like sharp images, but I don't want icicles in eyebrows either. I believe you said 175 LPI screening, so if it was me I would err on the sharp side...
    Something else I just thought of - the print size is something to think about, too. Consider the two extremes (which may or may not apply to your project) - thumbnails, and posters. If it's a thumbnail, by the time you've got the scaling right in Ps, there really isn't much pixel information left! In his instance a lot of sharpening probably wouldn't hurt, it would create contrast (which is important in very small images). The other end of the spectrum - posters. Actual pixels may be a little misleading in this case, because when the average person looks at a poster, they don't get right up on it at a normal reading distance, they view it from several feet away. For this reason sometimes poster images are only half-resolution, to keep the file size manageable, and give a more realistic view perspective.
    Hope this helps. I am not a forum expert. The others may have better advice, or may see errors in my information.

  • Median in OBIEE

    I have a requirement to get Median 10 sales in a given month. I was trying to implement this with Median function but it is not getting the way I expected.
    Is there a way to find Median 10 like Top 10 and Bottom 10 sales, I see TOPN and BOTTOMN function where in you can specify the number Like TOPN(Sales, 10) but it is not the same with Median. If anybody worked on this kind of calculation In OBIEE Answers Please HELP.
    Thank you
    Edited by: user12249262 on Nov 19, 2009 10:16 AM

    Hi,
    Try with level based measures: http://gerardnico.com/wiki/dat/obiee/measure_level_based
    J.

  • Median function in BEx query based webi report

    Hi Experts,
              I have a requirement to have a median function in a chart in my webi report. I'm using BO 4.0 SP2 Fix pack 2.9 and using IDT connection to connect BEx queries. I have 3 dimension objects in X axis and Median as y axis. When i'm calculating median, it need to have the child dimension aslo be part of the chart. but my requirement the child dimension should not be in the chart.
    Example: i have Region, Country and state dimensions as X axis, and Median of sales revenue by city as y axis.
    In my chart, i should not include city. So i have written the formula like "Median(Sales revenue) Forall(City) in (Region;Country; state)" and i tried all the combinations of this.
    When i'm including the city object its working fine, but when removint it, its not. Please help me in this.
    Thanks.

    Hi Suman,
    thanks aigain for your reply!
    I have tried your proposal before you have posted it.
    In my special case the following if/else statement works successfully:
    CKF = calculated key figure
    Formula1 = (CKF1 == 0) * 0 + (CKF1 <> 0) * CKF2
    In my case the CKF2 is the result value from "Incoming Order value" - "Turnover"
    So I had to define a separate Formula (1:1 equals to CKF2) and then I was able to set "*CKF2" in the statement.
    The statement CKF2 = (CKF1 == 0) * 0 + CKF2 is not possible (because it´s not possible to calculate from CKF2 itself).
    Now it works
    Best regards,
    Michael

Maybe you are looking for

  • Magic trackpad stops responding on wakeup after upgrade to Mavericks

    I have a 27" iMac purchased in July 2011.  I never had any issues with the trackpad before upgrading to Mavericks.  I upgraded a few months ago and started having sporadic issues with the trackpad.  When the iMac woke up, everything seemed fine at fi

  • Music shows/plays in itunes but is missing in explorer folder

    Itunes runs perfectly (knock on wood). However when I go to my library folder in explorer there are no music files there. Just three folders (Compilations, Itunes, Sample Music). Everything in the Itunes folder looks like system files. Where are all

  • How setup mac as dhcp?

    I would like to directly connect my NAS to my mbp. I need osx to assign an IP address to it. How do you setup osx to be a dhcp server.

  • Text retrieval in user exit

    Hi, Is there any way to retrieve the header text and operation text (if exists) in the user exit 'USER_EXIT_SAVE'  before the work order ( in plant maintenance ) gets saved to the database. i.e. we don't have the actual work order number and SAP repr

  • LM61 Unpack HU Materials or HU from HU

    Hi Please see attachment LM61 Unpack Screen flow. It should allow me to Unpack, but I get an error "Handling unit &1 not found in the warehouse". The HU does exist and the error message is not correct. Could someone please advise how to Unpack in RF?