Skip to Content

Default Logic: unable to use %CATEGORY_SET% in *SELECT

Hi all,

could you confirm that it is not possible to use %CATEGORY_SET% in a *SELECT statement when the logic is incluced in the Default logic?

For example, this kind of syntax doesn't work in Default Logic but it works fine when It is executed by a package:

*SELECT(%MY_TIME%,"ID","TIME","ID='%TIME_SET%'")

In this case, what kind of workaround is possible?

thanks for your help,

Romuald

Add a comment
10|10000 characters needed characters exceeded

Related questions

5 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Oct 08, 2010 at 11:54 AM

    Hi Romuald,

    You dont need this in the default logic. The default logic automatically restricts the whole logic based on the CV. On the other hand, the other scripts doesnt do this. Thats why, we send the members through DIMENSION_SET variable to restrict the scope of the logic.

    In the default, you dont have to use %TIME_SET%. The logic will automatically work on the time member selected in your CV.

    Hope this helps.

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Oct 08, 2010 at 02:21 PM

    Hi,

    indeed my example wasn't relevant. Here is a good example:

    *SELECT(%PREVCATEGORY%,"PREVIOUS_CATEGORY","CATEGORY","ID = '%CATEOGRY_SET%' ")

    *XDIM_MEMBERSET CATEGORY=%CATEGORY_SET%, %PREVCATEGORY%

    I use it to add the previous category defined in PREVIOUS_CATEGORY property.

    regards,

    Romuald

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hi Romuald,

      The logic will be already restricted to %CATEGORY_SET%. This category comes from your CV. Now, you need to add %PREVCATEGORY%, which can be done using XDIM_ADDMEMBERSET.

      Now, for fetching %PREVCATEGORY%, you can try to first fetch the previous_category using %DIMENSIONNAME%.Properties("%PROPERTYNAME%") and then use this in the select statement.

      Hope this helps.

  • Posted on Oct 08, 2010 at 03:18 PM

    OK but I how can I restrict my SELECT statement to the category provided by the CV?

    The following SQL syntax can not be used in Default logic:

    *SELECT(%PREVCATEGORY%,"PREVIOUS_CATEGORY","CATEGORY","ID = '%CATEGORY_SET%' ")

    I imagine that we have the same problem for MDX syntax. Could you detail the approach using %DIMENSIONNAME%.Properties("%PROPERTYNAME%")

    thanks for your help,

    Romuald

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Oct 08, 2010 at 03:24 PM

    Does it work if I have more than one category in my CV?

    I don't need to use SELECT statement, just to add %PREVCATEGORY% = CATEGORY.CurrentMember.Properties("PREVIOUS_CATEGORY")in my logic?

    regards,

    Romuald

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hi Romuald,

      You cannot have multiple members in your CV for a single dimension. You can keep only as single member. That member will be automatically passed to the default script.

      The MDX statement is actually a replacement for the select statement.

      This would have been much more easier using a separate script and calling it through DM.

      Hope this helps.

  • Posted on Oct 08, 2010 at 03:33 PM

    When you use an input schedule to input data on both ACTUAL and BUDGET data, the %CATEGORY_SET% used in Default logic is ACTUAL,BUDGET. In this case you have more than one category. Is there a MDX syntax to handle this case?

    regards,

    Romuald

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.