on 2023 Oct 12 2:23 PM
Dear all,
I have to try to copy data from specific members of a dimension to members of the same dimension based on an attribute in the dimension.
The member of the source dimension has the same id as the property.
An explicative table is shown here:
Step 1:
Insert the value in the table only for Product.Segment = X
The dimension is formed like this:
Final result:
I tried writing these codes, but it didn't work. Do you have any ideas?
MEMBERSET [d/Account] = ("GSR_VAT")
//DATA([d/Products]=[d/Products].[p/Segment])=RESULTLOOKUP()
// DATA([d/Products]=[d/Products].[p/Segment]) = RESULTLOOKUP([d/Measures]="FINAL_PERC")
// DATA([d/Measures]="FINAL_PERC", RESULTLOOKUP([d/Products].[p/Segment])) = RESULTLOOKUP([d/Products],[d/Measures]="FINAL_PERC")
Thanks
andreagaleandro
() around IF not required. It was not there in my initial post but I copied and it got carried over.
Try the below , I am assuming you have an attribute segment with value "X"
MEMBERSET [d/Account] = "GSR_VAT"
MEMBERSET [d/Measures] = "FINAL_PERC"
FOREACH [d/Products]
IF [d/Products].[p/Segment])!="X" THEN
DATA()=RESULTLOOKUP([d/Products]=[d/Products].[p/Segment])
ENDIF
ENDFOR<br>
OR, I removed the IF and ENDIF and moved it to member set. Here you can try removing for and end for
MEMBERSET [d/Account] = "GSR_VAT"
MEMBERSET [d/Measures] = "FINAL_PERC"
MEMBERSET [d/Products].[p/Segment])!="X"
FOREACH [d/Products]
DATA()=RESULTLOOKUP([d/Products]=[d/Products].[p/Segment])
ENDFOR
Br.
Nikhil
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
68 | |
8 | |
8 | |
6 | |
6 | |
6 | |
6 | |
6 | |
6 | |
5 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.