Top n  filter in universe based on two measures(MDX expression)

Hi,
    I have to do filter at universe level based on two measures. for example, i have
BusAr       year       value
ddddfd        1997      435433.
I can able to do filter using mdx expression for busniess area wise top 10 values in universe. using the following syntax
<FILTER EXPRESSION="Rank([0BUS_AREA].CurrentMember, Order([0BUS_AREA].CurrentMember.Level.Members, [Measures].[D7G51I90GYJ8POGFSYVFPX24F], BDESC))">
now i want to filter using year wise and business area wise top 10 filter  in universe.   where to add the second member yearwise in Rank () function.
how to achieve this.
Regards,
Shanthakumar.

Hi,
I am not sure you want to make a Top n filter on 2 different measures.
But if you want to make a Top n filter on 2 ore more different dimensions, here is the code.
IIf(IsEmpty([Measures].[Sales Amount]),null,
  Rank(   StrToTuple( "(" + Generate(Head(Axis(1),Axis(1).Item(0).Count) AS RN,
  "Axis(1).Item(0).Item(" +
  CStr(RN.CurrentOrdinal - 1) +
  ").Hierarchy.CurrentMember",
  ",") + ")" ),
  Axis(1),   [Measures].[Sales Amount]  )    )
Please note that the code is taking into account all dimensions involved in the rows axis, so the more dimensions yu add in the query the top n will increase the number of values.
I have successfully tested it on MSAS but it seems that on SAP the "+" character is not allowed...
Maybe there are some SAP notes to add.
Didier

Similar Messages

  • Unable to filter a formula field based on two conditions

    hi,
    I have a report with 3 subreports in it. When i drill down onto first subreport i am getting correct records in details based on selection criteria but when i am unable to populate the same record count in summary.
    For example
    On summary i see : 60 when i drill down i see 20 records which is correct but not reflecting onto summary report
    the details selection criteria is based on two  fields where field1>=1 and field2= "Text"It is coming out good (20 records) but in summary i am unable to populate this based on same selection criteria
    The main issue i am facing was if i apply a filter on summary selection criteria all the subreport counts are getting affected. Is there a way i can apply filters only one one field
    Please suggest
    Thanks!
    Lucky

    Thanks! for the prompt response Abhilash
    I got part of what you told me. Yes i am calculating the counts in the summary report.
    Basically here is the selection criteria: i need to filter the records based on two conditions. One is x.field1= "Admin" and x.field2=act_pct>=1
    For example:
    Admin Returns         50  but when i dig into details it showing as 20 records ( based on selection criteira above)
    when coming back to summary . 50 what ever is returing here is based on a formula ( if x.field1="admin" then 1 else 0) ..in addition to this i need to filter that by x.field2>=1 which is not taking it     
    Is there any syntax to do this
    If i apply a filter on this particular 50 record its bee applying for whole summary report ...
    And from what you said :
    Why don't you create the summary in the Subreport and maybe use shared variables to bring it back to the Main Report?
    i did not get this
    Please suggest
    Lucky

  • Custom Filter in Universe on top of BEX Query is not working in BO Explorer?

    Hi,
    I have created Condition(Filter) for an Dimension Object "Submitted by Group Hierarchy" in Universe designer tool on top of SAP BEx Query and then exported the universe to Repository.
    <FILTER KEY="@Select(Submitted By Group Hierarchy\L01 Submitted By Group Hierarchy).[TECH_NAME]"><CONDITION OPERATORCONDITION="InList"><CONSTANT CAPTION="@Prompt('Submitted By Group ','A',' Submitted By Group Hierarchy\L01 Submitted By Group Hierarchy',multi,primary_key,,{‘Direct Sales’)"/></CONDITION></FILTER>
    To test my custom filter , I have created WEBI report and its allowing input entry in my custom filter and output is also coming .
    where as in Explorer, i am not able to enter input values for my custom filter as below.
    Can anyone suggest me how to create custom filter in universe and use it in explorer.
    Thanks in advance.
    Regards,
    Ramana.

    Hi Ramana,
    Please try using 'mono' in place of multi in @prompt syntax and then test.
    Regards,
    Pranay Sharma

  • Olap Universe Based on BEx Query - Cascading Prompt

    I need to get two prompts: 1) Division 2) Group. Division has to be selected first and then Group. I understand I have to create cascading prompt. In the universe, in default hierarchy, group stands before before division. I have created a custon hierarchy like: Division, Group. I used Tools -> List of Values ->Create cascading list of values and then selected the right dimensions and then clicked on Generate LOVs. Then I have exported it to the repository. But I cannot see any reflection at the report level. So, some questions came in my mind:
    1) Where can I check in the universe whether my cascading prompt has been created or not ?
    2) I am using L01 Dimension. But underneath, there are two dimensions called LovDivision and LoVDivisionBase which are in Italic. I believe integration kit creates this. It is the same as Group. So, my question is: Am I selecting the right dimesnsions ? Or, should I select those in Italic.
    3) Actually, these two prompts (variables) [along with others] are already created in BEx which I can see in my report. My plan is, if my cascading prompts work, I will tell the BW developer to remove those two. Do you think that these existing prompts are creating any problem.
    I would really appreciate your response.

    Hi
    1) Where can I check in the universe whether my cascading prompt has been created or not ?
    Have you entered the cascading object in the  webi query condition.At the run time  it will generate  hierarchy in the tree structure.
    2) I am using L01 Dimension. But underneath, there are two dimensions called LovDivision and LoVDivisionBase which are in Italic. I believe integration kit creates this. It is the same as Group. So, my question is: Am I selecting the right dimensions ? Or, should I select those in Italic.
    correct you are using right objects L01.By mdx driver it will create by default L00 and L01 objects.neglect the Lo00 objects.You can  hide them in the universe or go to refresh structure and their is option to replace L00 definition with some other definition.
    3) Actually, these two prompts (variables) along with others are already created in BEx which I can see in my report. My plan is, if my cascading prompts work, I will tell the BW developer to remove those two. Do you think that these existing prompts are creating any problem.
    By default  when you are creating universe based on the mdx drivers it will convert Bex query filters in the universe condition as mandatory filter  and applied on the full universe.
    You can go to the universe condition and open the condition and unchecked the option  from their and after that these will not prompt in the webi query.
    Thanks,
    Amit

  • Universe based on SAP HANA OLAP connection

    Can I create universe based on SAP HANA OLAP connection ?
    How can i access SAP HANA view which was created using OLAP connection in WEBI and Dashboard? It does not allow creating Universe on top of SAP HANA OLAP connection and give an error.
    SAP BusinessObjects query and reporting applications can directly connect to OLAP SAP HANA connections. No universe is required, only a published OLAP SAP HANA connection.
    Thanks

    OLAP connection are only meant for tools that make use of OLAP connectivity only like BEx ..and HANA analytic views and calculated views are also treated as OLAP cubes for them..
    So these connection is only available with analysis product like Analysis Office (which is meant to be used with Bex or OLAP cubes ) and Design studio which is again mainly built around OLAP paradigm..
    You can not create a universe or Webi on Olap connection on HANA as of now.. However it could be like exposed in a future release of BO which is not public yet...

  • Can not create Webi report on a Universe based on Bex Query

    Hi,
    We are using BO XI 3.1 (FP 3.4) with SAP integration Kit (same Patch Level) with SAP Authentication. We have a Universe based on a bex query and its connection is set to use SSO.
    We have say two SAP users U1 & U2. Now "U1" is able to create webi reports but when we Logged in as "U2" and try to create Webi reports or try to refresh reports created by U1 it through an error ...
    The database error text is: (CS) "Error on NumResultCols" . (WIS 10901).....
    As per the "Authorization" section in BusinessObjects XI Integration for SAP Solution Installation Guide we have provided this users with all the mention autherizations.
    Any words over this will be highly appreciated.
    Regards,

    It is highly probable that this is due to missing authorizations on the SAP BW side (not talking about the authroizations which are directly related to the BO/BW integration). I would recommend to ask your SAP Basis team to do a security trace while you are accessing the reports with the user, who gets the error. THey should look for failing authorization checks.
    Regards,
    Stratos

  • WIS 10901 error when running webi report on top SAP BW InfoCube Universe

    Hello,
    After completing all the role assignments and integration kit installations, finally got to a point where have completed the universe development on top of a SAP BW InfoCube.
    Once, I have exported the universe tried creating a Webi report and with a simple one dimension report I am getting the error "error_db" "WIS 10901".
    I looked in the forums and came across some messages talking about MDX Parser. So, based on the OSS Note 1032461 went into SM59 to test the connection for MDX Parser and it is working fine.
    When I hit "Run query" from webi the following is the error message
    A database error occured. The database error text is: The supplied XML is not valid. [0GL_ACCOUNT].[LEVEL01].[20GL_ACCOUNT].[Value]. (WIS 10901)
    I am not sure what went wrong.
    Please let me know if I missed out anything or if there is anything else to be checked to avoid this error.
    I tried looking into SM21 and ST22 but did not see any error messages out there.
    Thanks
    Dharma.

    Hello,
    I also went into transaction MDXTEST and wrote a sample MDX statement on the InfoCube on top of which the universe is built.
    SELECT
    [Measures].MEMBERS ON COLUMNS,
    NON EMPTY [<dimension>].MEMBERS ON ROWS
    FROM [<cubename>]
    <dimension> is the dimension in the rows and <cubename> is the cube on top of which the Universe is built for creating the webi reports.
    This MDX came back with proper data.
    But the Webi is still giving me the same error.
    Please let me know.
    Thanks
    Dharma.

  • Multiple Universes (based on SAP BI Query) & single WebI Report

    Hi,
    We build OLAP Universes on SAP BI Queries. One of the ways to consume multiple universes in a single WebI report is to "add query" from another universe into the same WebI page / another WebI tab for the report.
    Is there a possibility to pick and choose fields from different Universes (based on SAP BI Queries), into a single WebI report ... of course respecting their technical linkage.
    regards,
    Rajesh K Sarin

    Hi Ingo,
    We have created multiple subject Area Universes (based on SAP BI Queries). Is there a possibility to select a particular object from one of the Universe and another object from another Universe into the same grid eg. Notification Number from Work Management Universe (SAP BI Query based on Customer Service Data Flow / Multiprovider) and Invoice Number from Invoicing Universe (SAP BI Query based on Invoicing Data Flow / Multiprovider). Common aspects for both of these could be say a Customer Account Number.
    As per my understanding, we cannot do this if we have created Universes on SAP BI Queries.
    Nearest possible option is to display two tables on the same WebI report - one from Work Mgmt Universe and other from Invoicing Universe.
    Please guide.
    regards,
    Rajesh K Sarin

  • OLAP Universes - Based on BEx Query - Month and Previous Month Functions

    Hi,
      I created a Universe based on SAP BEx queries and I like to create a filter so that I use in Web Intelligence report to run for "Previous Month" data always. There are "Date" filelds in BEx Query(No Month info only date data). I have no knowledge of SAP BEx Queries and new to OLAP universes. Could you help.
    How to create filter that show Previous Month.
    Nanda Kishore
    Edited by: Nanda Kishore B on Dec 26, 2010 6:15 AM

    The easiest way  (but NOT the most efficient one) is to create a local variable (Dimension) in your report with the following code:
    =if (Month(CurrentDate())=1 AND Month([[MyDate]])=12 AND Year([[MyDate]])=(Year(CurrentDate())-1)) OR (Month(CurrentDate())>1 AND   Month([[MyDate]])=(Month(CurrentDate())-1)) then 1 else 0
    where MyDate is the field from your query containing the data information
    Activate the report filter area in your report design panel by pressing the Report filter icon and drag and drop your variable there and apply it to the entire report. Filter value 1 and you will get the data for the previous month.
    Keep in mind that this approach is not optimal especially if you do have many rows of data delivered to your WebI report because filtering takes place only AFTER the data is retrieved. The Best practice here is to work with BEx variables.
    How many rows of data does your WebI report normally fetches?
    Regards,
    Stratos

  • Steps to create a Universe based on Bex query

    HI Gurus,
    I am (first time ofcourse) creating a Universe based on a Bex Query. I searched on SDN to find steps to craete a universe on top of Bex query and found a document written by tej Trivedi and found other threads also which explains all the steps.
    I understood from his document that in case of OLAP Universes the Structure pan would be empty. And I will not see joins etc..Is that true?
    How can I make sure that I will see data?
    Regards

    Hi,
    I believe this is a cross post from here Re: BEX Query Objects dont show in Universe  ?
    So i will put my answer again:
    Hi,
    If you can select your BEx query,  but the 'universe outline' in the webi query panel stays blank (i.e no available objects in the webi query panel)  then you don't have enough rights (authorizations) on the BW -side.
    to prove it, try using a sap_all profile in the universe connection .
    regards,
    H
    p.s. there is a large section on the required authorizations in the Admin guide.  Also a note covers it :  Note      1585948 - No objects are visible in the query panel when creating a report using Interactive Analysis or BI Launchpad

  • Create a universe based on multiple existing universes

    I have a BI 4 SP02 installed in Windows OS. I am using Information design tool to create data foundation to connect to multiple data sources. Instead of using multiple database connection, can I create a data foundation to connect to multiple universes. My intention is not to create new universe based on multiple databases. Instead, I want to combine two existing universes as one and create report from that. Is it possible to do? if so, may I know how to do that?
    Thank you

    Hi
    If you want to combine two universes and make a report of it, it is possible by universe linking concept.
    If you have two universes for example, then these two universes have to be linked by using any of these two methods.
    1. Add link
    2. Include link
    Add Link : Complete reusing of an existing universe in the current universe.
    Steps
    1. File > parameters > link tab> Add link> browse for the universe> open > ok.
    Then make the join between the common object.
    Save and export.
    Include link: Partially reusing of the existing in the current universe with few modifications.
    Steps
    1.File > parameters > link tab> Include link> browse for the universe> open > ok.
    Hope it helps.

  • Issues in creating a Pre-defined filter in Universe

    Hello Everyone,
    Here is the problem...
    The idea is to have a prompt (Prompt1) to allow user select the Input type ..ie."Check Number or Invoice Number". There is the second prompt (Prompt2) which will allow user to input a value. Based on Prompt1 value, the prompt2 input should be evaluated against Check Number object or Invoice Number Object.
    This is using a universe based on a BEx query.
    Following useful information in the OLAP universe Best practice doc available [here] which Ingo once shared with us [on this forum], I created following pre-defined filter in my universe.
    <OPTIONAL><FILTER EXPRESSION="IIF(@Prompt('Select Input type','A',{'Check','Invoice'},mono,free)='Check', [ZFIAP_IS1___F20].[LEVEL01],[ZFIAP_IS1___F46].[LEVEL01])"><CONDITION OPERATORCONDITION="Equal"><CONSTANT TECH_NAME="@Prompt('Enter Check or Invoice Number','A',,mono,free)"/></CONDITION></FILTER></OPTIONAL>
    Where [ZFIAP_IS1___F20].[LEVEL01] = Check Number & [ZFIAP_IS1___F46].[LEVEL01] = Invoice number.
    The object is parsing without errors in the universe. But when I use it in my report, the report throws an error " failed to execute with the error Invalid MDX command with " "
    I took the MDX statment and tried to run/debug using MDXTEST and could never get it to work with the above objects. It was seen that the filter created in such a way is handled [Measures] object which only accepts Numeric values and not Strings. Where as my Check number and Invoice Number values are strings. The MDx statement is given below.
    Has anyone experienced this issue earlier ?
    WITH MEMBER [Measures].[4C46B176-CC15-DF11-92,5D,25,C2,A9,6F,0,0] AS ' IIF(Check=Check, [ZFIAP_IS1___F20].[LEVEL01],[ZFIAP_IS1___F46].[LEVEL01]) ' SELECT { [Measures].[4GQZ1D26O6QATUDY32CGL1C38] } ON COLUMNS , NON EMPTY FILTER( CROSSJOIN( CROSSJOIN( CROSSJOIN( CROSSJOIN( CROSSJOIN( CROSSJOIN( [ZFIAP_IS1___F93].[LEVEL01].MEMBERS, [ZFIAP_IS1___F94].[LEVEL01].MEMBERS ), [ZFIAP_IS1___F92].[LEVEL01].MEMBERS ), [ZFIAP_IS1___F71].[LEVEL01].MEMBERS ), [ZFIAP_IS1___F55].[LEVEL01].MEMBERS ), [ZFIAP_IS1___F46].[LEVEL01].MEMBERS ), [ZFIAP_IS1___F20].[LEVEL01].MEMBERS ), [Measures].[4C46B176-CC15-DF11-92,5D,25,C2,A9,6F,0,0] = 0000041924670) DIMENSION PROPERTIES [ZFIAP_IS1___F55].[2ZCCNODE01], [ZFIAP_IS1___F55].[2ZCCNODE02], [ZFIAP_IS1___F55].[2ZCCNODE03] ON ROWS FROM [ZFIAP_IS1/QZFIAP_BOUNV2]
    Edited by: vaibhav patil on Feb 11, 2010 9:53 PM
    Edited by: vaibhav patil on Feb 11, 2010 9:55 PM

    Hi,
    In fact, what you are requiring is feasible in Microsoft Analysis Services by defining a calculated meaure and a filter using this calculated measure.
    Unfortunately, due to MDX restrictions in SAP, it is not possible to do it in universes.
    I suggest that you create a range variable on Time to allow the user to only retrieve the dates needed.
    You can retrieve all the dates and then apply a filter in Web Intelligence document: this solution might have the disadvantage to retrieve more data than necessary.
    Didier

  • Top-N Filter and Rank

    Hi,
    I want to display the Top-3 records based on the dashboard prompts and also display the overall rank of the record independent of the prompt.
    My data is in the format:
    Region Market Revenue
    East New York1 $100
    East New York2 $80
    East San Jose1 $50
    East San Jose2 $60
    North Det1 $125
    North Det2 $20
    North Dal1 $22
    North Dal2 $25
    Users will be selecting the Region, Market from Dashboard prompts and want to see the top-3 based on their selection and also see their rank nationally. So, If I selected East Region, my output should be
    Region Market Rev Rank
    East New York1 $100 2
    East New York2 $80 3
    East San Jose1 $50 5
    I defined a Top-3 filter and used Rank function but that gives the ranking as 1,2,3. This is expected as it is ranking the filtered set. I tried the Rank By function but that didn't help either.
    Any help would be appreciated.
    thanks,
    Prakash

    Build the "overall" ranking in the BMM layer and expose it as a separate column. Then add it to your Request. Now the rank will be independent of the filter.

  • Drill down in report based on two queries

    Hi,
    I have a problem with drilling down in report which is based on two queries.
    Queries are based on different universes.
    Both queries contains almost the same dimensions but different measures.
    In my report is a calculated measure based on measures from both queries.
    In both universes are the same hierachies.
    When I drill down in report for the first time I have to chose hierarchy  but then data are filtered to the choosen  value only from one query , data from second query are not filtered and the values of calculated measure are incorrect
    How can I solve this issue without adding dimensions belonging to the hierarchies to queries.
    Please help.
    Regards.
    MG

    Hi MG,
    First of all, what do you mean by "Both queries contains almost the same dimensions but different measures"
    "Almost" is not a good word in the IT world, especially when trying to merge/join tables. You need to be exact.
    That sounds like a possible reason for the problem.
    I am also not sure about your question:
    "How can I solve this issue without adding dimensions belonging to the hierarchies to queries."
    You may have to add those dimensions to the queries. Why would you not want to?
    Thanks

  • How to filter UWL workitem based system object

    Hi,
    My UWL (portal) is connected to ECC,SRM and BW system. I would like to see the workitems in UWL based on system alias(System Object).
    Please let me know the procedure to filter work item based on system object

    Hi Rajesh,
    You can achieve the required functionality using the System Configuration Group parameter. Here's what you need to do -
    1.      Partition back end systems into groups. This is accomplished by creating additional UWL iView instances, each of which refers to a specific group of backend systems.
    The group is defined, using the System Configuration Group iView property.
    2.      Then use the value of the System Configuration Group property when registering back end systems by placing it in parameter Configuration Group, when you register the SAP system.
    For more information refer to the two links below
    [http://help.sap.com/saphelp_nw70/helpdata/de/92/a88931f2dd4631b9e8d530697d89c9/content.htm]
    [http://help.sap.com/saphelp_nw70/helpdata/de/0a/ad68c125ae496f8c04a25090bd2e3c/content.htm]
    Hope it helps,
    Prathamesh

Maybe you are looking for

  • How to move SCCM service from one logical drive to another logical drive on site database server?

    Hi All, We are ussing SCCM 2012 RTM in our environment. We have one central site on Server1 and one primary site on server2. SCCM database of both sites are on remote servers we have one cluster (Name: Cluster1) in that we have four running SQL serve

  • Powershell does not recognize the path environment variable

    Hi, I am running powershell in ws2012 r2 version and when i attempted to run executable whose path is defined in the env:path variable, it can not run. Here is the output. How do I make the path recognizable in powershell so I dont have to type full

  • Internet Explorer has no place for me to hit "print". What do I do?

    On my Internet Explorer, I have no place to hit "print". Even when I right click, there's no choice for "print". What's my problem? I am not computer literate, so please instruct me in "everyday" language. Thank you.

  • Add vendor information in FB60

    In FB60, how to add vendor information in the right side of input screen? For example, I want to add the Postal code and Telebox under the name of vendor. I know I can implement it in business add-in "BADI_FDCB_SUBBAS04", but it's too difficult for m

  • Block throws exception ?

    is it possible to suggest that a block will throw an exception ... i.e.:static throws Exception { } is invalid ... i suppose its not possible ... ?