cancel
Showing results for 
Search instead for 
Did you mean: 

How to use FOREACH function by dim. Hierarchy?

dongun_kang
Explorer
0 Kudos
247

Hi experts,

We have diemension (A) with over 30,000 member.

And all memebers have fact data for every version.

But, we only use part of memebers in DA that its <STATUS> hierarhcy is "Active" (about 100 members)

Unfortunately, DA takes long time on that process. (even FOREACH.booked)

Is there any way to use foreach by dimension Hierarchy?

View Entire Topic
N1kh1l
Active Contributor
0 Kudos

dongun.kang

You can use the below syntax using attributes. for hierarchy you can scope members below a particular node and then loop on them.

If looped on attributes, members without attribute values are ignored.

FOREACH [d/dimension].[p/attribute]
ENDFOR
Example:
FOREACH[d/SAP_CEP_PRODUCT].[p/BRAND]
ENDFOR

Also you can just scope those members with attribute value

MEMBERSET [d/DIMENSION].[p/ATTRIBUTE] ="A"
FOREACH.BOOKED

ENDFOR

For hierarchy nodes, scope all members below the node and then loop

MEMBERSET[d/DIMENSION]=BASEMEMBER([d/DIMENSION] ,"NODEMEMBER" )
FOREACH.BOOKED

ENDFOR

Nikhil

dongun_kang
Explorer
0 Kudos

.I thought the scope of FOREACH or FOREACH.BOOKED is independant of MEMBERSET range, but it isn't?, thanks.