Vs Count Distinct Count

What is the difference between the meter and the meter separate in the advanced INTERFACE

Operations-> all settings-> deployed-> Count?

This metric is available in the advanced user interface and the custom user interface. Measures are not read in the Admin UI.

Distinct count is the actual number of virtual machines deployed, while the County is # trend / forecasting of the deployed virtual machines. Usually, you will notice the separate account doesn't have a very clear dynamic threshold, but the County has a dynamic rise. Speaking of which, I would say probably a couple more VMs to meet forecasts of my lab... ha.

Tags: VMware

Similar Questions

  • Additive and Non-additive measures (Distinct Count) in the same Cube

    I am aware that you can create a cube with a single non-additive measure (distinct count) as explained in this article:

    https://www.Google.co.UK/URL?SA=t & rct = j & q = & esrc = s & source = web & cd = 3 & cad = AJLN & uact = 8 & ved = 0CDkQFjACahUKEwiFpJ3K0MnHAhXFbB4KHfH7BfU & url = http %3 has % 2F % www.vlamis.com%2Fstorage%2Fpapers%2F2013_732_claterbos_ppr.pdf 2F & ei = nDPfVYXmIMXZefH3l6gP and usg AFQjCNF6fSAuRqaRGR-nIAGOM9fEY08j7A

    However, my requirement is to have additive and not additive in the same cube, measures, as you can do with cubes MSAS.

    Is this possible with Oracle OLAP cubes?

    I see you mentioned you want to make in the same cube. What is a difficult requirement?

    If this isn't the case, you may want to explore using 2 cubes where the first cube do distinct count. The second

    cube can have your aggregation you want and a calculated measure that references the first cube

    kinda like a cube considered. The OLAP option did a good job supporting cubes and multiple clients

    set up what is called the cubes that reference other cubes of the basis of the declaration. The SQL code that question that the cubes can view (s)

    be attached so that you can select a plan of several cubes SQL query in a single query.

  • How to calculate count them distinct (by xdoxslt:distinct_values) with an expression of the condition

    I have the XML data such as the following:

    < ListOfBipCustOptyProd >

    < CustOptyProd >

    < > 10000 loan < / Loan >

    Initial meeting < status > < / status >

    medium-sized < OptyCustomerType > < / OptyCustomerType >

    New client < OptyProdCustomerType > < / OptyProdCustomerType >

    < OptyId > 1 - ABCD < / OptyId >

    < / CustOptyProd >

    < CustOptyProd >

    < > 5000 loan < / Loan >

    < Status > close < / status >

    small business < OptyCustomerType > < / OptyCustomerType >

    Existing customer of < OptyProdCustomerType > < / OptyProdCustomerType >

    < OptyId > 1 - XYZ < / OptyId >

    < / CustOptyProd >

    < CustOptyProd >

    < > 80000 loan < / Loan >

    Initial meeting < status > < / status >

    medium-sized < OptyCustomerType > < / OptyCustomerType >

    New client < OptyProdCustomerType > < / OptyProdCustomerType >

    < OptyId > 1 - ABCD < / OptyId >

    < / CustOptyProd >

    < / ListOfBipCustOptyProd >

    I grouped the records of the State.

    I have the following formula in the Working Group:

    (to calculate the sum of all loans in the group where OptyCustomerType = 'SMEs' and OptyProdCustomerType = 'New client'

    <? amount (current-group () / Loan [.. / OptyCustomerType = 'Medium' and... / OptyProdCustomerType = 'New customer'])? >


    < to calculate the number of records in the group with a distinct value of OptyId
    <? count (xdoxslt:distinct_values(current-group()/OptyId))? >



    What I can't understand is the formula to calculate the number of records in the Group (where OptyCustomerType = 'SMEs' and OptyProdCustomerType = 'New customer') with a value separate from OptyId.  Someone knows how to write the expression?

    I tried the following, but it doesn't work:

    <? County (xdoxslt:distinct_values (current-group () / OptyId[.. / OptyCustomerType = 'Medium' and... / OptyProdCustomerType = 'New customer']))? >

    sth

  • Distinct count every time a month goes to the rear

    Hello

    I'm trying to find a good way to turn a repetitive motion to something a little more streamlined. Basically, I need generate the output of distinct users all the time per month, so if I ran the query as I would like to:

    Select (separate cd. INVESTIGATION period), "Jan," such as 'Month', cd.state, cd.zip
    from the cd from mytable
    where cd.date < to_date('20120101090001','yyyymmddhh24miss')

    can I change the date back a month and the name of 'Months' and the same union query.

    Any ideas?

    918455 wrote:
    The only problem I see is that when I want to group by zip code, etc.

    Then add the code postal etc to the PARTITION BY clause:

    with mytable as (
                     select 55 user_id,to_date('3/1/2012','mm/dd/yyyy') DateOfActivity from dual union all
                     select 45,to_date('2/1/2012','mm/dd/yyyy') from dual union all
                     select 45,to_date('2/3/2012','mm/dd/yyyy') from dual union all
                     select 45,to_date('1/1/2012','mm/dd/yyyy') from dual union all
                     select 25,to_date('2/1/2012','mm/dd/yyyy') from dual union all
                     select 25,to_date('2/3/2012','mm/dd/yyyy') from dual union all
                     select 35,to_date('1/1/2012','mm/dd/yyyy') from dual union all
                     select 35,to_date('12/1/2011','mm/dd/yyyy') from dual
                    ),
               t as (
                     select  first_value(DateOfActivity) over(partition by user_id,zipcode order by DateOfActivity) FirstOccurrence,
                             zipcode,
                             DateOfActivity
                       from  mytable
                    )
    select  distinct trunc(DateOfActivity,'MM') MonthOfActivity,
                     zipcode,
                     count(case DateOfActivity when FirstOccurrence then 1 end) over(partition by zipcode order by DateOfActivity) NumUsers
      from  t
      order by MonthOfActivity
    /
    

    SY.

  • Count distinct users registered

    Hello

    I have a table that contains the users and their hours of connection and disconnection. I need to know the maximum number of distinct users connected for a period of 15 minutes for each day. Periods of 15 minutes, start at 00:00 and ends at 23:45
    WITH user_data AS
    (SELECT 'USER1' user_id, TO_DATE('01-DEC-2010 11:57', 'DD-MON-YYYY HH24:MI') login_date, TO_DATE('01-DEC-2010 12:34', 'DD-MON-YYYY HH24:MI') logout_date FROM dual UNION ALL
     SELECT 'USER1' user_id, TO_DATE('01-DEC-2010 12:18', 'DD-MON-YYYY HH24:MI') login_date, TO_DATE('01-DEC-2010 12:23', 'DD-MON-YYYY HH24:MI') logout_date FROM dual UNION ALL
     SELECT 'USER1' user_id, TO_DATE('01-DEC-2010 12:41', 'DD-MON-YYYY HH24:MI') login_date, TO_DATE('01-DEC-2010 13:20', 'DD-MON-YYYY HH24:MI') logout_date FROM dual UNION ALL
     SELECT 'USER1' user_id, TO_DATE('01-DEC-2010 13:22', 'DD-MON-YYYY HH24:MI') login_date, TO_DATE('01-DEC-2010 15:12', 'DD-MON-YYYY HH24:MI') logout_date FROM dual UNION ALL
     SELECT 'USER1' user_id, TO_DATE('01-DEC-2010 13:25', 'DD-MON-YYYY HH24:MI') login_date, TO_DATE('01-DEC-2010 13:26', 'DD-MON-YYYY HH24:MI') logout_date FROM dual UNION ALL
     SELECT 'USER2' user_id, TO_DATE('01-DEC-2010 13:27', 'DD-MON-YYYY HH24:MI') login_date, TO_DATE('01-DEC-2010 13:30', 'DD-MON-YYYY HH24:MI') logout_date FROM dual UNION ALL
     SELECT 'USER1' user_id, TO_DATE('01-DEC-2010 13:34', 'DD-MON-YYYY HH24:MI') login_date, TO_DATE('01-DEC-2010 15:08', 'DD-MON-YYYY HH24:MI') logout_date FROM dual UNION ALL
     SELECT 'USER1' user_id, TO_DATE('01-DEC-2010 13:53', 'DD-MON-YYYY HH24:MI') login_date, TO_DATE('01-DEC-2010 16:38', 'DD-MON-YYYY HH24:MI') logout_date FROM dual UNION ALL
     SELECT 'USER3' user_id, TO_DATE('01-DEC-2010 14:00', 'DD-MON-YYYY HH24:MI') login_date, TO_DATE('22-FEB-2011 14:18', 'DD-MON-YYYY HH24:MI') logout_date FROM dual UNION ALL
     SELECT 'USER1' user_id, TO_DATE('01-DEC-2010 14:14', 'DD-MON-YYYY HH24:MI') login_date, TO_DATE('01-DEC-2010 15:20', 'DD-MON-YYYY HH24:MI') logout_date FROM dual UNION ALL
     SELECT 'USER1' user_id, TO_DATE('01-DEC-2010 14:15', 'DD-MON-YYYY HH24:MI') login_date, TO_DATE('01-DEC-2010 15:21', 'DD-MON-YYYY HH24:MI') logout_date FROM dual UNION ALL
     SELECT 'USER1' user_id, TO_DATE('01-DEC-2010 14:23', 'DD-MON-YYYY HH24:MI') login_date, TO_DATE('01-DEC-2010 15:29', 'DD-MON-YYYY HH24:MI') logout_date FROM dual UNION ALL
     SELECT 'USER1' user_id, TO_DATE('01-DEC-2010 14:30', 'DD-MON-YYYY HH24:MI') login_date, TO_DATE('01-DEC-2010 19:12', 'DD-MON-YYYY HH24:MI') logout_date FROM dual UNION ALL
     SELECT 'USER1' user_id, TO_DATE('01-DEC-2010 14:36', 'DD-MON-YYYY HH24:MI') login_date, TO_DATE('01-DEC-2010 15:46', 'DD-MON-YYYY HH24:MI') logout_date FROM dual UNION ALL
     SELECT 'USER1' user_id, TO_DATE('01-DEC-2010 14:39', 'DD-MON-YYYY HH24:MI') login_date, TO_DATE('01-DEC-2010 16:40', 'DD-MON-YYYY HH24:MI') logout_date FROM dual UNION ALL
     SELECT 'USER1' user_id, TO_DATE('01-DEC-2010 14:44', 'DD-MON-YYYY HH24:MI') login_date, TO_DATE('01-DEC-2010 16:08', 'DD-MON-YYYY HH24:MI') logout_date FROM dual UNION ALL
     SELECT 'USER1' user_id, TO_DATE('02-DEC-2010 09:10', 'DD-MON-YYYY HH24:MI') login_date, TO_DATE('02-DEC-2010 12:25', 'DD-MON-YYYY HH24:MI') logout_date FROM dual UNION ALL
     SELECT 'USER1' user_id, TO_DATE('02-DEC-2010 09:52', 'DD-MON-YYYY HH24:MI') login_date, TO_DATE('02-DEC-2010 13:01', 'DD-MON-YYYY HH24:MI') logout_date FROM dual UNION ALL
     SELECT 'USER1' user_id, TO_DATE('02-DEC-2010 10:03', 'DD-MON-YYYY HH24:MI') login_date, TO_DATE('02-DEC-2010 13:08', 'DD-MON-YYYY HH24:MI') logout_date FROM dual UNION ALL
     SELECT 'USER1' user_id, TO_DATE('02-DEC-2010 10:37', 'DD-MON-YYYY HH24:MI') login_date, TO_DATE('02-DEC-2010 11:53', 'DD-MON-YYYY HH24:MI') logout_date FROM dual UNION ALL
     SELECT 'USER2' user_id, TO_DATE('02-DEC-2010 10:40', 'DD-MON-YYYY HH24:MI') login_date, TO_DATE('02-DEC-2010 12:01', 'DD-MON-YYYY HH24:MI') logout_date FROM dual UNION ALL
     SELECT 'USER1' user_id, TO_DATE('02-DEC-2010 10:54', 'DD-MON-YYYY HH24:MI') login_date, TO_DATE('02-DEC-2010 10:59', 'DD-MON-YYYY HH24:MI') logout_date FROM dual UNION ALL
     SELECT 'USER1' user_id, TO_DATE('02-DEC-2010 10:55', 'DD-MON-YYYY HH24:MI') login_date, TO_DATE('02-DEC-2010 11:02', 'DD-MON-YYYY HH24:MI') logout_date FROM dual UNION ALL
     SELECT 'USER1' user_id, TO_DATE('02-DEC-2010 10:59', 'DD-MON-YYYY HH24:MI') login_date, TO_DATE('02-DEC-2010 11:00', 'DD-MON-YYYY HH24:MI') logout_date FROM dual UNION ALL
     SELECT 'USER2' user_id, TO_DATE('02-DEC-2010 11:00', 'DD-MON-YYYY HH24:MI') login_date, TO_DATE('02-DEC-2010 12:58', 'DD-MON-YYYY HH24:MI') logout_date FROM dual UNION ALL
     SELECT 'USER1' user_id, TO_DATE('02-DEC-2010 11:20', 'DD-MON-YYYY HH24:MI') login_date, TO_DATE('02-DEC-2010 13:12', 'DD-MON-YYYY HH24:MI') logout_date FROM dual UNION ALL
     SELECT 'USER1' user_id, TO_DATE('02-DEC-2010 11:45', 'DD-MON-YYYY HH24:MI') login_date, TO_DATE('02-DEC-2010 14:18', 'DD-MON-YYYY HH24:MI') logout_date FROM dual UNION ALL
     SELECT 'USER1' user_id, TO_DATE('02-DEC-2010 11:53', 'DD-MON-YYYY HH24:MI') login_date, TO_DATE('02-DEC-2010 13:10', 'DD-MON-YYYY HH24:MI') logout_date FROM dual UNION ALL
     SELECT 'USER1' user_id, TO_DATE('02-DEC-2010 11:57', 'DD-MON-YYYY HH24:MI') login_date, TO_DATE('02-DEC-2010 12:54', 'DD-MON-YYYY HH24:MI') logout_date FROM dual UNION ALL
     SELECT 'USER1' user_id, TO_DATE('02-DEC-2010 12:01', 'DD-MON-YYYY HH24:MI') login_date, TO_DATE('02-DEC-2010 12:54', 'DD-MON-YYYY HH24:MI') logout_date FROM dual UNION ALL
     SELECT 'USER1' user_id, TO_DATE('02-DEC-2010 12:09', 'DD-MON-YYYY HH24:MI') login_date, TO_DATE('02-DEC-2010 13:37', 'DD-MON-YYYY HH24:MI') logout_date FROM dual UNION ALL
     SELECT 'USER3' user_id, TO_DATE('02-DEC-2010 12:12', 'DD-MON-YYYY HH24:MI') login_date, TO_DATE('02-DEC-2010 12:13', 'DD-MON-YYYY HH24:MI') logout_date FROM dual UNION ALL
     SELECT 'USER1' user_id, TO_DATE('02-DEC-2010 12:54', 'DD-MON-YYYY HH24:MI') login_date, TO_DATE('02-DEC-2010 15:58', 'DD-MON-YYYY HH24:MI') logout_date FROM dual UNION ALL
     SELECT 'USER1' user_id, TO_DATE('02-DEC-2010 13:12', 'DD-MON-YYYY HH24:MI') login_date, TO_DATE('02-DEC-2010 13:19', 'DD-MON-YYYY HH24:MI') logout_date FROM dual UNION ALL
     SELECT 'USER1' user_id, TO_DATE('02-DEC-2010 13:13', 'DD-MON-YYYY HH24:MI') login_date, TO_DATE('02-DEC-2010 15:11', 'DD-MON-YYYY HH24:MI') logout_date FROM dual UNION ALL
     SELECT 'USER1' user_id, TO_DATE('02-DEC-2010 13:22', 'DD-MON-YYYY HH24:MI') login_date, TO_DATE('02-DEC-2010 13:50', 'DD-MON-YYYY HH24:MI') logout_date FROM dual),
    pivs AS
    (SELECT 0 piv_num FROM dual UNION ALL
     SELECT 1 piv_num FROM dual UNION ALL
     SELECT 2 piv_num FROM dual UNION ALL
     SELECT 3 piv_num FROM dual UNION ALL
     SELECT 4 piv_num FROM dual UNION ALL
     SELECT 5 piv_num FROM dual UNION ALL
     SELECT 6 piv_num FROM dual UNION ALL
     SELECT 7 piv_num FROM dual UNION ALL
     SELECT 8 piv_num FROM dual UNION ALL
     SELECT 9 piv_num FROM dual UNION ALL
     SELECT 10 piv_num FROM dual UNION ALL
     SELECT 11 piv_num FROM dual UNION ALL
     SELECT 12 piv_num FROM dual UNION ALL
     SELECT 13 piv_num FROM dual UNION ALL
     SELECT 14 piv_num FROM dual UNION ALL
     SELECT 15 piv_num FROM dual UNION ALL
     SELECT 16 piv_num FROM dual UNION ALL
     SELECT 17 piv_num FROM dual UNION ALL
     SELECT 18 piv_num FROM dual UNION ALL
     SELECT 19 piv_num FROM dual UNION ALL
     SELECT 20 piv_num FROM dual UNION ALL
     SELECT 21 piv_num FROM dual UNION ALL
     SELECT 22 piv_num FROM dual UNION ALL
     SELECT 23 piv_num FROM dual UNION ALL
     SELECT 24 piv_num FROM dual UNION ALL
     SELECT 25 piv_num FROM dual UNION ALL
     SELECT 26 piv_num FROM dual UNION ALL
     SELECT 27 piv_num FROM dual UNION ALL
     SELECT 28 piv_num FROM dual UNION ALL
     SELECT 29 piv_num FROM dual UNION ALL
     SELECT 30 piv_num FROM dual UNION ALL
     SELECT 31 piv_num FROM dual UNION ALL
     SELECT 32 piv_num FROM dual UNION ALL
     SELECT 33 piv_num FROM dual UNION ALL
     SELECT 34 piv_num FROM dual UNION ALL
     SELECT 35 piv_num FROM dual UNION ALL
     SELECT 36 piv_num FROM dual UNION ALL
     SELECT 37 piv_num FROM dual UNION ALL
     SELECT 38 piv_num FROM dual UNION ALL
     SELECT 39 piv_num FROM dual UNION ALL
     SELECT 40 piv_num FROM dual UNION ALL
     SELECT 41 piv_num FROM dual UNION ALL
     SELECT 42 piv_num FROM dual UNION ALL
     SELECT 43 piv_num FROM dual UNION ALL
     SELECT 44 piv_num FROM dual UNION ALL
     SELECT 45 piv_num FROM dual UNION ALL
     SELECT 46 piv_num FROM dual UNION ALL
     SELECT 47 piv_num FROM dual UNION ALL
     SELECT 48 piv_num FROM dual UNION ALL
     SELECT 49 piv_num FROM dual UNION ALL
     SELECT 50 piv_num FROM dual UNION ALL
     SELECT 51 piv_num FROM dual UNION ALL
     SELECT 52 piv_num FROM dual UNION ALL
     SELECT 53 piv_num FROM dual UNION ALL
     SELECT 54 piv_num FROM dual UNION ALL
     SELECT 55 piv_num FROM dual UNION ALL
     SELECT 56 piv_num FROM dual UNION ALL
     SELECT 57 piv_num FROM dual UNION ALL
     SELECT 58 piv_num FROM dual UNION ALL
     SELECT 59 piv_num FROM dual UNION ALL
     SELECT 60 piv_num FROM dual UNION ALL
     SELECT 61 piv_num FROM dual UNION ALL
     SELECT 62 piv_num FROM dual UNION ALL
     SELECT 63 piv_num FROM dual UNION ALL
     SELECT 64 piv_num FROM dual UNION ALL
     SELECT 65 piv_num FROM dual UNION ALL
     SELECT 66 piv_num FROM dual UNION ALL
     SELECT 67 piv_num FROM dual UNION ALL
     SELECT 68 piv_num FROM dual UNION ALL
     SELECT 69 piv_num FROM dual UNION ALL
     SELECT 70 piv_num FROM dual UNION ALL
     SELECT 71 piv_num FROM dual UNION ALL
     SELECT 72 piv_num FROM dual UNION ALL
     SELECT 73 piv_num FROM dual UNION ALL
     SELECT 74 piv_num FROM dual UNION ALL
     SELECT 75 piv_num FROM dual UNION ALL
     SELECT 76 piv_num FROM dual UNION ALL
     SELECT 77 piv_num FROM dual UNION ALL
     SELECT 78 piv_num FROM dual UNION ALL
     SELECT 79 piv_num FROM dual UNION ALL
     SELECT 80 piv_num FROM dual UNION ALL
     SELECT 81 piv_num FROM dual UNION ALL
     SELECT 82 piv_num FROM dual UNION ALL
     SELECT 83 piv_num FROM dual UNION ALL
     SELECT 84 piv_num FROM dual UNION ALL
     SELECT 85 piv_num FROM dual UNION ALL
     SELECT 86 piv_num FROM dual UNION ALL
     SELECT 87 piv_num FROM dual UNION ALL
     SELECT 88 piv_num FROM dual UNION ALL
     SELECT 89 piv_num FROM dual UNION ALL
     SELECT 90 piv_num FROM dual UNION ALL
     SELECT 91 piv_num FROM dual UNION ALL
     SELECT 92 piv_num FROM dual UNION ALL
     SELECT 93 piv_num FROM dual UNION ALL
     SELECT 94 piv_num FROM dual UNION ALL
     SELECT 95 piv_num FROM dual UNION ALL
     SELECT 96 piv_num FROM dual UNION ALL
     SELECT 97 piv_num FROM dual UNION ALL
     SELECT 98 piv_num FROM dual UNION ALL
     SELECT 99 piv_num FROM dual)
    SELECT   s2.cdate,
             MAX(s2.user_count)
    FROM    (SELECT TO_CHAR(t.cdate, 'DD-MON-YYYY') cdate,
                    SUM(LEAST(t.user_count, 1)) user_count
             FROM  (SELECT   TO_DATE('01-DEC-2010', 'DD-MON-YYYY') + p1.piv_num cdate,
                             TO_CHAR(TO_DATE((p2.piv_num * 15) * 60, 'SSSSS'), 'HH24:MI') time,
                             SUM(CASE WHEN TRUNC((TO_DATE('01-DEC-2010', 'DD-MON-YYYY') + p1.piv_num) + (p2.piv_num * 15)/1440, 'MI') BETWEEN s.login_date and s.logout_date THEN 1 ELSE 0 END) user_count
                    FROM     pivs p1,
                             pivs p2,
                            (SELECT user_id,
                                    login_date,
                                    logout_date
                             FROM   user_data) s
                    WHERE    p1.piv_num < 2 -- number of days I want to look at i.e. 01-DEC-2010 and 02-DEC-2010
                    AND      p2.piv_num < 96 -- number of 15 minute periods in a day i.e. 00:00 to 23:45
                    GROUP BY p1.piv_num,
                             p2.piv_num,
                             s.user_id
                    ORDER BY p1.piv_num,
                             p2.piv_num) t
             GROUP BY t.cdate,
                      t.time) s2
    GROUP BY s2.cdate
    ORDER BY TO_DATE(s2.cdate)
    /
    For the above test data, I expect to see:
    Date        Users
    ----------- -----
    01-DEC-2010     2
    02-DEC-2010     3
    The code above works, but I'm sure there must be a better way to do it, I can't see how...

    Lee

    Hello

    Here's one way:

    WITH     parameters  AS
    (
         SELECT  TO_DATE ( '01-Dec-2010'               -- Starting time (included in output)
                   , 'DD-Mon-YYYY'
                   )     AS start_dt
         ,       TO_DATE ( '03-Dec-2010'               -- Ending time (NOT included in output)
                   , 'DD-Mon-YYYY'
                   )     AS end_dt
         ,     24 * 4          AS periods_per_day
         FROM     dual
    )
    ,     periods          AS
    (
         SELECT     start_dt + ((LEVEL - 1) / periods_per_day)     AS period_start
         ,     start_dt + ( LEVEL      / periods_per_day)     AS period_end
         FROM     parameters
         CONNECT BY     LEVEL <= (end_dt - start_dt) * periods_per_day
    )
    ,     got_cnt_per_period     AS
    (
         SELECT       p.period_start
         ,       COUNT (distinct user_id)     AS cnt
         ,       ROW_NUMBER () OVER ( PARTITION BY  TRUNC (period_start)
                                       ORDER BY      COUNT (*)   DESC
                               ,               period_start
                                    )         AS rnk
         FROM       periods     p
         JOIN       user_data     u  ON   p.period_start     <= u.logout_date
                           AND     p.period_end     >  u.login_date
         GROUP BY  p.period_start
    )
    SELECT       period_start
    ,       cnt
    FROM       got_cnt_per_period
    WHERE       rnk     = 1
    ORDER BY  period_start
    ;
    

    You will notice that it does not use the pivs table. Generate periods of time with a CONNECT BY query is likely to be more effective, and you don't have to worry about having enough rows in the table pivs.
    In this way avoids also all conversions between DATEs and strings (except for the entrance of the start_dt and end_dt parameters), which should take some time.

    If you are actually hardcode the parameters in the query, the abopve version will be easier to use and maintain, because each parameter only has to register once, in the first auxiliary request.

    The output includes the start time of the period who had the highest number on each day. If there are equal (as in this example of data, there were 3 periods December 1, which had a number of 2), then the specified period is that earlier that day. If you want to see all, replace ROW_NUMBER RANK by the last auxiliary request, got_cnt_per_peroid. Of course, you don't have to display the time if you do not want.

  • Count Distinct on a window

    Hello world

    I read an article about a measure of viscosity (http://www.seomoz.org/blog/tracking-browse-rate-a-cool-stickiness-metric). It's basically a way to measure how well you attract people to your Web site.

    Viscosity for the last 7 days: (County of different users today) / (number of distinct users for the last 7 days)
    Viscosity for the last 30 days: (County of different users today) / (number of distinct users for the last 30 days)

    I have a table called WC_WEB_VISITS_F that is in the grain of the user's visit to one of my web sites.

    Is there a way I can use OBIEE to calculate values above?

    I can get the numerator. I create a logical column called count of separate to everyday users and aggregation set to Distinct Count on USER_ID and then I pivot my report to the Date of visit.

    I can't understand how Distinct Count for X days. If there were separate count for this month, I just copy the count of distinct daily users and set the content to the month level, however, it is a floating range, I can't do that.

    Does anyone have an idea of Cleaver for this?

    Thank you!

    -Joe

    11g is the function PERIODROLLING, which is the answer to all these requirements. The PERIODROLLING function allows you to perform an aggregation on a specified set of periods of grain of query rather than a grain of fixed time series. The most common use is to create rolling averages, as "13-week Rolling average." With 10 all we will get is a feature limited according to solutions...

  • OVERALL TOTAL incorrect (with COUNT DISTINCT)

    Hello

    I get incorrect results in a DISTINCT COUNT measure column GRAND TOTAL.

    I have 5 separate in Paris and 10 separate clients in New York, I want the grand total for the sum of the two, it is 15.
    But OBIEE calculates separate customers for all cities, so if there are customers in Paris and New York, the result is false.


    This is the result I get:

    City Number_Distinct_Customers
    ----------------------------------------------------------------------------
    Paris 5
    NEW YORK CITY 10
    GRAND TOTAL 12


    12 is the number of all separate clients.

    The correct GRANT TOTAL is expected to be 5 + 10 = 15



    Thank you
    Concerning

    I guess that COUNT(DISTINCT...) is regarded as the default aggregation in the Oracle replies.
    To come in this, change the State of aggregation of fx (formula column in the criteria of answers tab) to 'SUM '...

    Let me know if that solves your problem.
    -bifacts :-)
    http://www.obinotes.com

  • Distinct count in the instruction box

    -------------------------------------------------------------------------------------------------
    SELECT A.P_ID,
    B.P_NAME,
    C.P_DESC,

    SUM (CASE
    WHEN A.DATE BETWEEN TRUNC (ADD_MONTHS (LAST_DAY (SYSDATE),-4) + 1) AND ADD_MONTHS (LAST_DAY (TO_DATE (SYSDATE)),-1)
    AND A.M_ID IS NOT NULL
    THEN 1
    0 OTHERWISE
    END) AS COUNT,
    SUM (CASE
    WHEN A.DATE BETWEEN TRUNC (ADD_MONTHS (LAST_DAY (SYSDATE),-4) + 1) AND ADD_MONTHS (LAST_DAY (TO_DATE (SYSDATE)),-1)
    AND A.M_ID IS NOT NULL
    THEN COUNT (DISTINCT A.M_ID)
    0 OTHERWISE
    END) AS UNIQUE_COUNT, / * is not possible * /.
    SUM (CASE
    WHEN A.DATE BETWEEN TRUNC(SYSDATE,'YEAR') AND ADD_MONTHS (LAST_DAY (TO_DATE (SYSDATE)), - 1).
    THEN A.AMT_1
    0 OTHERWISE
    END) AS TOTAL_AMT_1,
    SUM (CASE
    WHEN A.DATE BETWEEN TRUNC(SYSDATE,'YEAR') AND ADD_MONTHS (LAST_DAY (TO_DATE (SYSDATE)), - 1).
    THEN A.AMT_2
    0 OTHERWISE
    END) AS TOTAL_AMT_2

    FROM TABLE_A A,.
    TABLE_B B,.
    C TABLE_C


    WHERE A.P_ID = B.P_ID
    AND B.PT_ID = C.PT_ID
    A.P_ID GROUP,
    B.P_NAME,
    C.P_DESC

    ----------------------------------------------------------------------------------------------------------

    Hello

    It is a simplified version of my request.
    I'm doing 4 things here,
    1. the County A.M_ID
    2 County has separate .M_ID, is where I have a problem.
    3 and 4. It is just the sum of 2 diff columns.

    Note that the dates for the County and the amt are different and I can't hard-code the.
    Can someone help me step of distinct count?
    This query runs also a bit slow.
    So all suggestions, comments are welcome.
    Note: TABLE_A REB 700 million, TABLE_B 4 million and TABLE_c is located only 500 RECS
    Thank you!

    Advantage of the fact that aggregate functions more ignore nulls, you could do something like:

    SELECT a.p_id, b.p_name, c.p_desc,
           COUNT(CASE WHEN a.date BETWEEN TRUNC(ADD_MONTHS(LAST_DAY(sysdate),-4) + 1) AND
                                          ADD_MONTHS(LAST_DAY(TO_DATE(sysdate)),-1) AND
                           a.m_id IS NOT NULL THEN m_id END) AS countall,
           COUNT(DISTINCT CASE WHEN a.date BETWEEN TRUNC(ADD_MONTHS(LAST_DAY(sysdate),-4) + 1) AND
                                        ADD_MONTHS(LAST_DAY(TO_DATE(sysdate)),-1) AND
                         a.m_id IS NOT NULL THEN a.m_id END) AS unique_count, /* entirely possible */
           SUM(CASE WHEN a.date BETWEEN TRUNC(sysdate,'YEAR') AND
                                        ADD_MONTHS(LAST_DAY(TO_DATE(sysdate)),-1) THEN a.amt_1
                    ELSE 0 END) AS total_amt_1,
           SUM(CASE WHEN A.DATE BETWEEN TRUNC(sysdate,'YEAR') AND
                                        ADD_MONTHS(LAST_DAY(TO_DATE(sysdate)),-1) THEN A.AMT_2
                    ELSE 0 END) AS TOTAL_AMT_2
    FROM table_a a, table_b b, table_c c
    WHERE a.p_id = b.p_id and
          b.pt_id = c.pt_id
    GROUP BY a.p_id, b.p_name, c.p_desc
    

    The two statements inside the COUNTY box return a.m_id or NULL. A simplified test case is:

    SQL> WITH t as (
      2     SELECT 1 m_id, 9 dt FROM dual UNION ALL
      3     SELECT 1 m_id, 6 dt FROM dual UNION ALL
      4     SELECT 2 m_id, 9 dt FROM dual UNION ALL
      5     SELECT 2 m_id, 6 dt FROM dual UNION ALL
      6     SELECT 1 m_id, 5 dt FROM dual UNION ALL
      7     SELECT 2 m_id, 5 dt FROM dual UNION ALL
      8     SELECT null m_id, 9 dt FROM dual)
      9  SELECT count(CASE WHEN dt BETWEEN 6 and 9 THEN m_id end) cid,
     10         count(distinct CASE WHEN dt BETWEEN 6 and 9 THEN m_id end) cdid
     11  FROM t;
    
           CID       CDID
    ---------- ----------
             4          2
    

    I'm not entirely sure that you really need the IS NOT NULL predicate a.m_id in the instructions BOX, but I left it for more security.
    John

  • How to count the total number of records with distinction?

    Hello guys

    I have a report that contains a list of the types of company and other attributes as follows:
    Shipto               Company Type             GC Code               Measures
    A                         cc                             x                          100
                                                               y                          200
                                                               c                          120
    
    B                         YUT                         I                            200
                                cc                           U                           98
    
    G                         Maid                        rt                           200
                               YUT                        TT                         300
                               JTE                         TY                         400
    
                               
     
    The list goes on and... "Business type" appears is not the highest or the lowest... I would like to see what is the total number of different company types we have. By this report, there should be 5, but if I count or count (*) or rcompte, I actually get the total number of lines in the present report, which is not what I want...

    If someone could help me to find the total number of company types?

    Thanks in advance

    Have you tried this one?

    Sum (Count (distinct ColumnName))

  • How to count distinct exclusion of a value in the business layer?

    Hi all

    I have a column that has a lot of values. I need to do is a measure with aggregator separate count. But I shouldn't count 0 in the column. How can I do that. If I try to use any way to condition the aggregator option is disable. Help, please

    Thank you

    Look at this example:

    I did MDB table is DIRTY as:

    Count_Distinct_Prod_Id_Exclude_Prod_Id_144

    I'll count distinct PRODUCTS. PROD_ID, but exclude PROD_ID = 144 when counting.

    Make this measure like this:

    1. new column object/logic
    2. go in tab data type and click EDIT the table logic table source
    3. now, in the general tab add join of a table (in my case of PRODUCTS)
    4. go in the column mapping tab-> see the deleted column mapping

    5. in the new column (in my case Count_Distinct_Prod_Id_Exclude_Prod_Id_144) write similar code:
    CASE WHEN "orcl". » ». "" SH ". "PRODUCTS '." "' PROD_ID ' = 144 THEN ELSE NULL"orcl ". » ». "" SH ". "PRODUCTS '." "' PROD_ID ' END

    6. click OK and close the source logical table
    7. now, in the logical column window go to the tab of the aggregation and choose COUNT DISTINCT.

    8. move the Count_Distinct_Prod_Id_Exclude_Prod_Id_144 measure for presentation

    9 test answers (report cointains columns as follows)

    PROD_CATEGORY_ID
    Count_Distinct_Prod_Id_Exclude_Prod_Id_144

    And the result in the NQQuery.log is:

    Select T21473. PROD_CATEGORY_ID C1,
    Count (distinct from cases when T21473.) PROD_ID is 144, then NULL else T21473. End PROD_ID) C2
    Of
    PRODUCTS T21473
    Group of T21473. PROD_CATEGORY_ID
    order of c1

    Concerning
    Goran
    http://108obiee.blogspot.com

  • Getting Sum, Count, and Distinct Count of a file

    Hi all, this is a question of UNIX.

    I have a large flat file with millions of records.
    col1 | col2. col3
    1. a | b
    2. c | d
    3. e | f
    3. g | h
    footer *.

    I'm supposed to do to calculate the sum of the [= 9] col1 col1 County [= 4] and a separate account of col1 [= c3]

    I would like if you avoid external commands like AWK. Also, can we do the same thing by creating a function?

    Please keep in mind that the file is huge

    Thanks in advance

    Yes, I suppose that it is very much inappropriate for answering this question here, I just like awk too] :))

    where x is the file:

    sum(col1) : awk -F\| '{col1+=$1}END{print col1}' x
    count(col1): wc -l x | awk '{print $1-2}'
    count(distinct col1): cut -d\| -f1 x|sort -u|wc -l|awk '{print $1-2}'
    

    Perl would be a much more effective tool to use here... try a perl forum :)

  • COUNT (DISTINCT &lt; nom_de_colonne &gt;)

    I would like to display the count (DISTINCT < company >) at the end of the report. I use a SQL query in the form of data / the whole model. Thanks in advance.

    NEW YORK CITY
    JANUARY 1, 2008

    Company ID DIFF
    ABC 1-1
    2 2 XYZ
    ABC 3-1

    FEBRUARY 1, 2008

    Company ID DIFF
    MNO 1-1
    2 2 XYZ
    MNO 3-1

    Total number of companies: 3

    Use this

  • Distinct count for group in rtf

    Hi all, I want to calculate separate counting for the field in a given group. <? count (current - group () / EMP_ID)? >

    The formula works only for the County.

    I even tried this..? count (xdoxslt:distinct_values(EMP_ID))? >

    but I can't use it for the group.

    Thanks, Sushil

    Use this:

    Thank you

    Bipuser

  • Maximum, Count Distinct functions in the model.

    Hello

    I have a set of data that I tried to regroup for a report.
    I need in the report so that I have product code list in a column and Max (Product Code) in another column product code, product code Sub are strings and not numbers.


    Suppose that my data set has


    product code:-product-sub-code
    ____________________________

    ABC | 1A
    ABC | 1 b
    ABC | 1 c
    def | 1 B
    def | 2B
    def | 2 c
    ...
    ...
    ....
    ...
    ...

    I need to report

    ABC | 1A
    def | 2B

    ..



    I gathered it and I tried to show the Max (product code) for the current group. But it gave me a number instead of text. I tried to select 'text' to the form field. But it is automatically change the number.


    Also, can you let me know how to write the number (code of separate by-product). I must also add that column.

    I can't add in SQL because there are tons of models on this data set. I have to do it in the model.

    Any help is greately appreciated.

    Try using this: -substitute your domain under product code name

    Thank you
    Bipuser

  • Summary of complex scenario (counties)

    Hi all

    Looking for inspiration and ideas with this little teaser

    I'm trying to find a common approach to the production of four counts (A, B, C and D) indicated in lines 1 to 5 below. This function of a table that contains about 4 000 entries.

    In affect, I try to summarize the different permutations in the classifications of four cells show in the image above, using a common approach. I might add a column for each company and use wild-card account, but I'd rather keep the table of (imported) origin of tact - I know that I could build a table of distinct society in another piece of work, but there must be a smarter way to achieve this.

    The legend below presents an overview of how the data looks like with different options (style truth table). The reference column contains a master list starting with RE - unique references.

    NC and P columns contain company names. There are two additional columns and the television that contain one or more numbers starting with- and TV - respectively.

    The idea is to check that the RE has a link to references or TV in the respective columns when there is a company name in the naming context and / column P

    There are a number of scenarios based on conditional counts in two columns: following NC and P with the possible permutations:

    Swap 1: Where there is a company name in the column "NC" count the number of:

    • RE links to OF
    • RE TV links
    • RE links to OF and TV
    • RE completely unrelated
    • More than one company with no link

    Swap 2: Where there is a company name in the column 'P' count the number of:

    • RE links to OF
    • RE TV links
    • RE links to OF and TV
    • RE completely unrelated
    • More than one company with no link

    Switch 3: When there is an entry in the column "NC" both "P":

    • RE links to OF
    • RE TV links
    • RE links to OF and TV
    • RE completely unrelated
    • More than one company with no link

    At this point, my head began to ache - would be very grateful and ideas on how this could be done.

    Thanks in advance

    Perry

    If I understand correctly, you can compile your different counts using COUNTIF with the * wildcard, something like this:

    For more convenience in formulas to set up your data in a table and your account in another.

    Here are the formulas in the table 'Account':

    B2: = COUNTIFS(Data::$B,"*RE*",Data::C,"<>"&"",Data::$F,"*DE*")
    C2: = COUNTIFS(Data::$B,"*RE*",Data::D,"<>"&"",Data::$F,"*DE*")
    D2: = SUM(B2:C2)
    B3: = COUNTIFS(Data::$B,"*RE*",Data::C,"<>"&"",Data::$G,"*TV*")
    C3: = COUNTIFS(Data::$B,"*RE*",Data::D,"<>"&"",Data::$G,"*TV*")
    D3: = SUM(B3:C3)
    B4: = COUNTIFS(Data::$B,"*RE*",Data::C,"<>"&"",Data::$F,"*DE*",Data::$G,"*TV*")
    C4: = COUNTIFS(Data::$B,"*RE*",Data::D,"<>"&"",Data::$F,"*DE*",Data::$G,"*TV*")
    D4: = SUM(B4:C4)
    B5: = COUNTIFS(Data::$B,"*RE*",Data::C,"<>"&"",Data::$F,"",Data::$G,"")
    C5: = COUNTIFS(Data::$B,"*RE*",Data::D,"<>"&"",Data::$F,"",Data::$G,"")
    D5: = SUM(B5:C5)

    You can learn more about COUNTIF here (you can also access it via help > formulas & functions help menu.)

    For more information on the search for wildcards of 'wild' in help > formulas & functions help

    The function works with pairs of columns-condition, where you add a reference to a beach (usually a column because it's more convenient) and then apply a 'condition' against it, indeed the application of several filters.

    You can add pairs more than necessary.

    SG

Maybe you are looking for

  • I can't Fandor on Apple TV

    I can't Fandor on Apple TV without having to listen to from a separate device?

  • How to remove existing messages on the computer?

    I have text messages from my mac air recorded on my Word document, how to remove?

  • 9.1 solves all problems?

    So 9.1 was released but I can not test it because I turned my Apple TV 4 as not good. So curious to know if 9.1 fixed: -Bluetooth keyboards -Remote Apps -App discovery -Controlled HDMI AVRs -Limits Siri in YouTube -Limits Siri in the rest -Dolby 5.1

  • Xoom: failure of system updates

    Hi, I have recived bot updates htk55 and htk57 and when they were installing in mid-way through a yellow exclamation jumped upwards, then it restarted, and when I checked the Tablet section in the android version and build number settings have not ch

  • Acer iconia b1 tablet wifi problems

    just bought acer Tablet b1 as starter and wifi only works when my router is powered on.the router is a d-link dsl-2680 to talktalk.can for assistance. Victor