cancel
Showing results for 
Search instead for 
Did you mean: 

Data Action that calculates on all leaves on selected filter on parent

andreagaleandro
Explorer
0 Kudos

Dear Community,

I am experiencing a difficulty in creating this data action

MEMBERSET [d/Account] = ("GSR_RET_PRICE")
MEMBERSET [d/Market] = %vMarket%
MEMBERSET [d/Products] = %vProduct%
MEMBERSET [d/Date] = %vDateFrom% TO %vDateTo%
MEMBERSET [d/Measures] = ("ADJ_PERC", "ADJ")

FLOAT @pAdj = %vAdj%
FLOAT @pAdj_Perc = %vAdj_Perc%

DATA([d/Measures]="ADJ") = RESULTLOOKUP([d/Measures]="ADJ") * 0 + @pAdj
DATA([d/Measures]="ADJ_PERC") = RESULTLOOKUP([d/Measures]="ADJ_PERC") * 0 + @pAdj_Perc
DATA([d/Measures] = "FINAL_VALUE_M") = (RESULTLOOKUP([d/Measures] = "FINAL_VALUE_M") *(1+(@pAdj_Perc/100))+@pAdj)<br>

The parameter on the product was created like this

The Data Action in the story was set like this.

In the story filter, a parent level of the hierarchy was selected so that the Data Action is done on all leaves of that parent level.

Once the run is started and the data action finishes its activities, no results are obtained.

Values are written only if instead of selecting the parent node you go and select individual leaves.

Am I getting some settings wrong or is there any way to do what is described?

Thank you to those who will help me

Accepted Solutions (1)

Accepted Solutions (1)

N1kh1l
Active Contributor
0 Kudos

andrea_galeandro

I am assuming SXR50 passed as value for products is a parent node. Try with below changes

In The parameter configuration, For Hierarchy select a suitable hierarchy.

In the code

Change this line

MEMBERSET [d/Products] = BASEMEMBER([d/Products],%vProduct%)

So this will work for leaf members if parents node or leaf is passed from Input control.

Br.

Nikhil

andreagaleandro
Explorer
0 Kudos

Many Thanks

Answers (0)