TopCount with filter or exists

I have a user asking for a measure that returns the TOP 15 revenue accounts. I don't think that is possible but I can be wrong as I'm new to this. I believe I need to create a Set as doing
CREATE MEMBER
CURRENTCUBE.[Measures]....
Will not work.
So in excel 2013 I created a set like and returns the TOP 10 but I need to add a filter or some how to excluded to specific members of the parent client Dimension.
TopCount(
 [Clients].[Parent Clients].Children
 ,10
 ,[Measures].[Total Revenue]
But I need to exclude 2 Parent Clients ...I need to exclude New Clients, New Sales.
I try to use the EXCEPT function but that only leaves off one parent like
TopCount(
Except(
[Clients].[Parent Clients].Members,
[Clients].[Parent Clients].[Parent Client].&[New Sales]) ,
10,
[Measures].[Total Revenue]
The above MDX gives me back only 9 records instead of 10. I believe the except is striping one of even though New Sales isn't in the top 10.
So I need help getting the TOP 10 but to exclude 2 members from the dim even thought they may not be part of the TOP 10. And need TOP 10 to return 10 records.

thanks for the reply and the set within the {} gave me help as I didn't know you could have multiple members inside the except function. But the issue is when I create a dynamic set like
CREATE DYNAMIC SET CURRENTCUBE.[Top 15 Parent Client]
AS TopCount([Clients].[Parent Clients].[Parent Client], 10, [Measures].[Total Revenue]),
DISPLAY_FOLDER = 'Clients' ;
and user in excel uses this set [Top 15 Parent Client] we get the desire results but it the user adds another member from another Dim like Dim Finance. Instead of getting the Top 15 Clients within Finance Districts we get the Top 15 parent clients and thier
district. In excel we can get the results we want without using Top 15 Parent Client set and just use the DIm Parent Client and Dim Finace then do a filter via excel so the MDX from excel looks like this, which I'm trying to mmic in the Cube, is there away?
SELECT
{ [Measures].[Total Revenue]} DIMENSION PROPERTIES PARENT_UNIQUE_NAME
, HIERARCHY_UNIQUE_NAME ON COLUMNS
, NON EMPTY CrossJoin (
Hierarchize (
DrilldownLevel (
{ [Financial Entities].[Financial Operational Units].[All] }
, INCLUDE_CALC_MEMBERS
, Hierarchize (
DrilldownLevel (
{ [Clients].[Parent Clients].[All] }
, INCLUDE_CALC_MEMBERS
) DIMENSION PROPERTIES PARENT_UNIQUE_NAME
, HIERARCHY_UNIQUE_NAME
, [Financial Entities].[Financial Operational Units].[Financial Operational Unit].[Financial Area] ON ROWS
FROM (
SELECT Generate (
CrossJoin (
Hierarchize ( [Financial Entities].[Financial Operational Units].[Financial Operational Unit].AllMembers )
, Hierarchize (
{ [Clients].[Parent Clients].[All] }
) AS [XL_Filter_Set_0]
, TopCount (
Filter (
Except (
DrilldownLevel ( [XL_Filter_Set_0].Current AS [XL_Filter_HelperSet_0],, 1, INCLUDE_CALC_MEMBERS )
, [XL_Filter_HelperSet_0]
, Not IsEmpty ( [Measures].[Total Revenue] )
, 15
, [Measures].[Total Revenue]
) ON COLUMNS
FROM [Finance Summary Development]
WHERE ( [Version].[Versions].[Version].&[FY14 FCST] )
WHERE ( [Version].[Versions].[Version].&[FY14 FCST] ) CELL PROPERTIES VALUE
, FORMAT_STRING
, LANGUAGE
, BACK_COLOR
, FORE_COLOR
, FONT_FLAGS

Similar Messages

  • How to know if implementation with a filter value exist for a BAdI in code?

    Hi all,
    Scenario:
    I created a BAdI. There will be a button on the UI to call its implementation(s); while if there is no implementation with specified filter value, this button needs to be hidden. Thus I need to know if the implementation exist before calling it.
    Question:
    In the ABAP code, how to get whether implementation with specified filter value exists for a BAdI?
    If it's possible, please help provide code.
    Thanks and regards,
    Said

    Problem solved:
    data: r_badi type ref to YOUR_BADI,
              badi_impl_num type i.
      get badi r_badi
        filters
          flt_name = fit_val.
      badi_impl_num = cl_badi_query=>number_of_implementations( badi = r_badi ).
      if badi_impl_num > 0.
        "there are badi implementation(s)
      endif.

  • Creation of Change request with reference to existing change request

    Hi
    I want to do Creation of Change request with reference to existing change request for MDG-F and MDG c/MDG S Is it possible? If yes, How?

    Hi Sanjay,
    No , its not out of box functionality in MDG. Reason being, MDG framework provided some standard API's with the help of which we can do our development with ease.
    Like Governance API                            : IF_USMD_GOV_API
           Convenience Governance API         :IF_USMD_CONV_SOM_GOV_API
           Change Request API Interface:       IF_USMD_CREQUEST_API
    With the help of which you can play around with your data in MDG with the pre-defined methods of it.
    Best Regards,
    Kaustubh

  • What's with the non-existant free trial download for Photoshop?

    What's with the non-existant free trial download for Photoshop?  You click on "Download free trial" and it takes you to a page that takes you to a forum… nothing happens.  I've done this about 6 times on two browsers.  Of course, there's no help from Adobe, so I'm trying this forum.  Thanks!

    Thanks very much for a prompt reply!  Much appreciated. Unfortunately, that's exactly the page I was on. And I used both Firefox and Safari and got the same page, with the same nothing...
    As this forum doesn't allow attachments, I'll cut and paste the page here (there's not much):
    Keep learning
    Whether you're new or a pro, we're always making Photoshop better.
    Learn more with these tutorials.
    Get support
    Have any questions? Visit the Learn & Support area for help.
    That's all that's on the page.  No buttons, URLs, menus… nothing.  And just to confirm, the URL  is as you gave: https://creative.adobe.com/products/download/photoshop
    Something's fishy...

  • Create customer master record with reference to existing division

    how to create customer master record with reference to existing division?

    what type of reports sd consultant configure in implementation project?and in supporting project?

  • How to reset an iPad with a pre-existing Apple ID/iCloud acct?

    We just bought a new (to us) iPad mini to use at our preschool in one of our classrooms.  The iPad mini came with a pre-existing account still loaded on it and will not let me set it up like the other 6 we already own (with our school's Apple ID/iCloud acct.  What can I do to get this setup other than trying to contact the previous owner (which we have and haven't received an answer)?
    Thanks in advance!

    You can't reset the code. The only option you have is to restore the device as new.

  • Reg an Error: no function with name 'CURRENT_RECORD' exists in this scope

    Hi All,
    I am getting the following error when i try using Set_Item_Instance_Property for assigning a visual attribute to an item.
    This is the code. I have replaced Display_Item with Set_Item_Instance_Property for setting the visual attribute.
    --DISPLAY_ITEM(lv_cur_item, 'VA_CURRENT_BUTTON');
    SET_ITEM_INSTANCE_PROPERTY(lv_cur_item,CURRENT_RECORD,VISUAL_ATTRIBUTE,'VA_CURRENT_BUTTON');
    no function with name 'CURRENT_RECORD' exists in this scope
    Any suggestion regarding this.
    Regards,
    Prasad.

    L.Rajesh - :SYSTEM.CURRENT_RECORD global variable does not exist - use :SYSTEM.CURSOR_RECORD or :SYSTEM.TRIGGER_RECORD instead.
    Prasad - what version of Forms are you using? For Forms 6i and higher, CURRENT_RECORD property is a valid reference. (not sure about Forms 5 or earlier as I don't have access to these versions any longer :) ) Are you logged into a database when you compile your code? There might be a TYPO somewhere in your code that the PL/SQL compiler can't determine the cause and CURRENT_RECORD is the first recognizable term the compiler can find. Sometimes, I've had to log out, close Forms Builder and reopen the form I'm working on to eliminate these types of odd compilation errors.
    Hope this helps,
    Craig B-)
    If a response is helpful or correct, please mark it accordingly.

  • No function with name 'F_ITEMCHECK' exists in this scope

    Hi i have a error:
    SQL> Declare
    2 Cursor stk_val is
    3 Select prod_code,prod_desc, bal_Stock from prod_tran;
    4 mProd_code prod_tran.prod_Code%type;
    5 mProd_desc prod_tran.prod_desc%type;
    6 mProd_qty prod_tran.prod_qty%type;
    7 valexits integer;
    8 bal_stock integer;
    9 vquantity integer;
    10 f_itemcheck integer;
    11 Begin
    12 Open stk_val;
    13 loop
    14 Fetch stk_val into mprod_code,mprod_desc,mprod_qty;
    15 exit when stk_val%notfound;
    16 valexits := f_itemcheck(mprod_code);
    17 if valexits = 0 then
    18 insert into prod_mast(prod_code,prod_Desc,bal_Stock)
    19 values(mprod_code,mprod_Desc,mprod_qty);
    20 elsif valexits = 1 then
    21 update prod_mast
    22 set bal_stock = bal_stock+ vquantity
    23 where prod_code=mprod_code;
    24 end if;
    25 end loop;
    26 close stk_Val;
    27 end;
    28 /
    Declare
    ERROR at line 1:
    ORA-06550: line 3, column 34:
    PLS-00320: the declaration of the type of this expression is incomplete or malformed
    ORA-06550: line 3, column 6:
    PL/SQL: SQL Statement ignored
    ORA-06550: line 16, column 22:
    PLS-00222: no function with name 'F_ITEMCHECK' exists in this scope
    ORA-06550: line 16, column 10:
    PL/SQL: Statement ignored

    May be try this code
    Declare
      Cursor stk_val is
      Select prod_code,prod_desc, bal_Stock
        from prod_tran;
      v_prod stk_val%rowtype;
      valexits    integer;
      bal_stock   integer;
      vquantity   integer;
    Begin
      Open stk_val;
      loop
        Fetch stk_val into v_prod;
        exit when stk_val%notfound;     
        valexits := f_itemcheck(v_prod.prod_code);
        if valexits = 0 then       
          insert into prod_mast(prod_code,prod_Desc,bal_Stock)
          values(v_prod.prod_code,v_prod.prod_Desc,v_prod.prod_qty);
        elsif valexits = 1 then
          update prod_mast
             set bal_stock = bal_stock+ vquantity
           where prod_code=v_prod.prod_code;
        end if;
      end loop;
      close stk_Val;
    end;Note: Code untested

  • Create condition record with reference to existing condition record

    how to create condition record with reference to existing condition record?

    Hi,
    See this link :
    http://help.sap.com/saphelp_47x200/helpdata/en/de/7a8534c960a134e10000009b38f83b/frameset.htm
    You can create with reference with Tcode : VK14 (or VK34)
    Or in VK12, you can copy condition records with copy rules.
    Regards,
    Lionel

  • OBIEE 11g - Aggregation With filter

    Hi all ,
    I have a reg where the condition to be applied in ONE COLUMN of a report is as follows
    select count(*)
    from (SELECT SUM(quantity),SUM(quantity_received) qty_rec ,SUM(quantity)-SUM(quantity_received) qty ,po_header_id
          FROM F_ERP_PO
          group by po_header_id)
    where qty > 0
      and qty_rec <> 0     
    .. I  have multiple columns in the reports with varying conditions
    I tried out in different ways but could not bring the answer since this condition is just ofr one column and the next column has other conditions.
    Kindly help me in simplifying this report . I am stuck with it for long
    Thanks in advance,
    Regards,
    Niv d

    Hi Chris,
    Thanks for ur response.
    I tried usinf FILTER() function in different ways. But I had a comparison like
    FILTER("F1 Facts"."Total Revenue" USING (sum("PO"."Quantity") = sum("PO"."Quantity_Recieved") )) .
    Here the error is like Cannot use aggregation with the USING clause .
    I even tried with, Filter based on another request feature , it throws an error saying 'cannot use multiple select clause '
    Any suggestions would be very helpful.
    Regards,
    Niv D

  • Error: PLS-222: no function with name 'V' exists in this scope

    In my application, I used the wizard to create a form on a table with Report (2 pages). Then I go to the Report page and I want to test the edit function. This successfully launches the edit Form. When I change the values in the form and then try to save them, I get this error:
    Error Unable to process row of table PRODUCER.
    OK
    ORA-20001: Error in DML: p_rowid=ISDIRECT12, p_alt_rowid=KEYCODE, p_rowid2=, p_alt_rowid2=. ORA-06552: PL/SQL: Statement ignored ORA-06553: PLS-222: no function with name 'V' exists in this scope
    I guess my question is: should I be able to run and use the application while in developer mode.
    If yes, what am I doing wrong?

    We downloaded the companion CD product from OTN
    In the install, we just set up the second option (for HTML db. No glitches on the install, ended successfully
    Read the notes in the doc folder. No issues there
    Platform for development is Win XP Pro
    DB server and app server on same PC.
    Not sure what else you might need to know to answer your question

  • Grant select role with filter ?

    hi,
    is it possible to Grant select with filter to a role, for example,
    user should select where ename='smith'

    I guess you may want something similar to VPD

  • Compression fails with Characteristic attribute exists twice

    Guys,
    I ran a compression on cube 0PP_C03 that failed with "Characteristic
    attribute exists twice"
    I see that "Note 859320 - Multiple reference points in InfoCubes with non-cumulative v" tells me to run that program to clear up any dups in the E Fact table.
    I currently have 4,060,118 rows in the E Fact table.
    I ran rsrv program "Multiple Entries in Dimensions of a (Basis) InfoCube" and there are NO dups in the F Fact table.
    Running "Note 859320 - Multiple reference points in InfoCubes with non-cumulative v" indicates that I have 42,627 dups. The note talks about running RSCDS_MERGE_DUPL_REF_POINTS and I ran it using no reference points in simulation mode. Maybe I need to specify some selection conditions?
    I'd like to make sure I am executing the correct procedure prior to running this pgm live. Additionally, all of a sudden I have this same condition on cubes 0PM_C03, 0SD_C03, and ZSM_C001 as well. This is the first time I have seen this ocurrence.
    Has anyone any experienve running this or having this compression error condition?
    Mike

    As I remember I got the error message:
    Characteristic attribute exists twice with DBMAN 231
    So I ran se38 pgm:
    RSCDS_MERGE_DUPL_REF_POINTS, putting in the cube like 0PM_C03 and pkg size 100
    and it fixed the problem.
    Hope that helps. I just saw this and we don't have BW anymore. We have moved to HANA and shutdown BW.
    Mike

  • How to use aggregator with filter  operator

    Hi,
    how can i use aggregation with filter operator. i have a table, form this table i have to calculate this valurs
    1. no of notes
    2. no of open notes where attribute =y (logic for one notes is count(notes) where attribute =y)
    2. no of closed notes where attribute =n
    for this i used like this
    table --> two filter operators 1 is for attribute =y and one is for attribute=n ----> to aggregaror operator. --- i am getting error.
    Regards,
    Jyothy

    Jyothy,
    Try this..
    U can use the below code in the aggregator without filters
    sum(decode(notes,'y',1,0) adn sum(decode(notes,'n',1,0)
    Regards,
    Sivarama

  • FRM-47001: Cannot create parameter list aamir : list with this name exists.

    Sir I use parameter list in my form whose name aamir first time when I call report system give result right but second time I call report then system give this error
    FRM-47001: Cannot create parameter list aamir : list with this name exists.
    Please give me idea how I get print view second time
    Thank
    aamir

    Hello aamir,
    Use the following to delete existing parameter.
    DECLARE pl_id ParamList;
    BEGIN
    pl_id := Get_Parameter_List('tempdata');
    IF NOT Id_Null(pl_id) THEN
    Destroy_Parameter_List(pl_id);
    END IF;
    END;
    Cheers,
    Suresh

Maybe you are looking for

  • Proxy to File using EOIO

    Hi Experts, I have a scenario where I need to send data from SAP to PI so I am using proxy to file scenario. Here i need to send huge amount of data. In some blog i saw that proxy can handle only some maximum amount of data.(but not 100% sure how muc

  • I can't restore my iphone.  when i plug it in, the phone recognizes that it is plugged into itunes, but itunes doesn't recognize it

    My iphone charges when I plug it into my computer, but itunes doesn't recognize that any device is attached (I have the latest version; a pc, not a mac; it's a Verizon iphone).  Also, the phone's info button (which should tell me the serial number) s

  • ITunes won't quit to allow upgrade

    Current iTunes stubbornly refuses to quit. I cannot upgrade to the latest version.

  • Couldn't render the page

    All of a sudden I am unable to download pdf and bank statements. the message "couldn't render the page" keeps coming up. I am running windows vista.

  • MOVIECLIP SLIDESHOW

    Hi, I am trying to create a slideshow that has a 'next' and 'previous' button, which lets you see the next or previous movieclip when you click one of the buttons. I have done the 'next' button but cannot do the 'previous' button, please can someone