Skip to Content
avatar image
Former Member

Conditions in OLAP Universe (Analysis Services)

Hi,

We have an OLAP universe connected to Analysis Services 2005. We would like to create a condition to use it as a filter to the reports in Web Intelligence. I have searched documentation about this, and i'm trying to get this code into the condition...

<CONSTANT CAPTION="@Select(MeasuresValor), .[Jerarquia Tiempo].Año].PrevMember)/></CONDITION></FILTER>

We want to determine the scope of the report dinamically so we can bring last year and actual year only, without having to define it as a constant.

Even though when I insert this statement, the parse it, the parse failed.

I would appreciate any suggestions.

CO

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

3 Answers

  • avatar image
    Former Member
    May 26, 2009 at 07:43 AM
    Hi,

    If the filter parse failed it is because:
    • @Select statement doesn't refer to an object
    • @Prompt synatx is incorrect
    After having a look on the syntax, it seems that the XML syntax is incorrect but maybe the @Select also is incorrect: @Select doesn't refer to an object. The syntax for @Select is:
    @Select(parent classobject name)
    Be sure that the class you are referring in the @Select is the class or sub-class parent of the object.

    Moreover I noticed that your MDX syntax is also incorrect, try this:
    <FILTER KEY="[Fecha].[Año].[Año]"><CONDITION OPERATORCONDITION="InList">
    <CONSTANT CAPTION="(@Select(MeasuresValor), [Fecha].[Jerarquia Tiempo].[Año].PrevMember)"></CONSTANT></CONDITION></FILTER>

    Didier
    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    May 26, 2009 at 05:43 PM

    The parse is successfull, but when i use it in a report as a filter it doesn't get me any data.

    In Analysis Services i have a named set declared as follow

    Filter(Intersect([Fecha].[Jerarquia Tiempo].[Año].Members, [Fecha].[Jerarquia Tiempo].[Año].Members), Val([Fecha].[Jerarquia Tiempo].CurrentMember.Properties("Año Actual")) = 1).Item(0).PrevMember

    The Value of the propertie "Año Actual" identifies the current year, and with this sentence it brings me the previous year.

    What I'm trying to do is get the same funcionality from the Universe in BO.

    How can I get this?

    Tks

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hi Claudia,

      I didn't realize that the solution I proposed was in fact incorrect.

      Because we are not proposing in this current version the ability to manipulate Named Sets, we only have the ability to define calculated measures.

      If you need to retrieve only the previous year, here are 2 propositions depending on the property values you have defined.

      The first syntax will retrieve all periods except the current year:

      <FILTER EXPRESSION="IIF ([Fecha].[Jerarquia Tiempo].Properties("Año Actual") = 1, 0, 1)"><CONDITION OPERATORCONDITION="Equal">
      <CONSTANT CAPTION="1"></CONSTANT></CONDITION></FILTER>

      The second syntax will retrieve only previous years if we assume that the "Año Actual" property is equal to "0":

      <FILTER EXPRESSION="IIF ([Fecha].[Jerarquia Tiempo].Properties("Año Actual") = 0, 1, 0)"><CONDITION OPERATORCONDITION="Equal">
      <CONSTANT CAPTION="1"></CONSTANT></CONDITION></FILTER>

      Regards,

      Didier

  • avatar image
    Former Member
    May 27, 2009 at 04:30 PM

    Hi Didier,

    The purpose of the condition is to use it as a filter in the reports, so I can have a range of data and this one can be dinamic. This way I can get the last three years, and this range would move with the years, and so on with other periods, last 12 months, last 30 days, etc.

    I would appreciate if you know any other way to get this done.

    Tks for your help.

    Claudia

    Add comment
    10|10000 characters needed characters exceeded