cancel
Showing results for 
Search instead for 
Did you mean: 

BPC Script Logic - XDIM_FILTER results in error

Former Member
0 Kudos

I am writing a Script Logic in BPC and I need it to include all records where the DESTINATION dimension member has the Dimension Property of PLANDEST = "Y"

This approach works:

*SELECT(%DestinationMbrs%,"[ID]","Destination","[PlanDest] = 'Y'")

*XDIM_MEMBERSET DESTINATION = %DestinationMbrs%

This approach does not work:

*XDIM_MEMBERSET DESTINATION = <ALL>

*XDIM_FILTER DESTINATION=[DESTINATION].PROPERTIES("PlanDest")="Y"

It results in the error message at runtime:

Error in step 1 of QueryCubeAndDebug: -2147467259 Query (1,156) The PLANDEST dimension attribute was not found.

The reason I would like to use the second approach is that the first approach relies on the SELECT statement. The documentation on the SELECT statement says:

The *SELECT statement is executed at the time the logic is validated, and the expanded result is

written in the LGX file. This means that if the related dimension is modified, it may be necessary

to re-validate the rules.

So if I change the DESTINATION dimension members PLANDEST flags, I need to re-validate the script logic. That is a maintenance nightmare and a problem waiting to happen.

How do I solve this so that the dimension attribute is evaluated at runtime, not at logic validation time?

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi again,

My last message did not get posted with the right characters being displayed! The TIME dimention after the equals sign should be enclosed by the square brackets [ ]. Hop this diplays correctly this time!

Cheers,

Max

Former Member
0 Kudos

Don't know if you figured out or not. But I am having the same issue and it took a while to figure out. Here is the trick. it is not about syntax format. it is using MDX logic to get properties, so you need check InApp for this property in your Dimension.

james_lim
Advisor
Advisor
0 Kudos

As Yuan Said, if you are using MDX logic and want to use property, you should check Inapp at the 'manage property' menu of admin console.

Usually, InApp sholud not be selected for better performance of MDX query. (SAP recommendation)

But. Here are two cases that you should select.

1. MDX logic in the logic script.

2. Dimension formula.

I hope it will make clear for all.

James Lim

Answers (2)

Answers (2)

Former Member
0 Kudos

The following worked for me - try this:

*XDIM_FILTER TIME=[TIME].properties("YEAR")="2010"

Use the "[" & "]" aroundthe the Dim name after the equal sign

Former Member
0 Kudos

The help guide has the statement written as the following:

*XDIM_FILTER ACCOUNT = [account].properties("ACCTYPE")="AST"

so I would try to add the brackets around the dimension, or single quotes around the property value.

Hope this helps.

Former Member
0 Kudos

I tried

*XDIM_FILTER DESTINATION=DESTINATION.PROPERTIES('PlanDest')="Y"

*XDIM_FILTER DESTINATION=[DESTINATION].PROPERTIES("PlanDest")="Y"

*XDIM_FILTER DESTINATION=[DESTINATION].PROPERTIES('PlanDest')="Y"

*XDIM_FILTER DESTINATION=[DESTINATION].PROPERTIES("PLANDEST")="Y"

*XDIM_FILTER DESTINATION=[DESTINATION].PROPERTIES(PLANDEST)="Y"

and none of these work.

Former Member
0 Kudos

Hi,

As previously specified, the property needs to be selected as InApp. Otherwise this property cant be stored in the OLAP cube and it cant be referred in the MDX queries.

Hope this helps.