on 2023 Oct 19 4:14 PM
Hello
I am trying to set up an advanced formulas script inside a data action to copy data from member "000000" of the Date dimension to a dynamic set of members of the Date dimension, which must correspond to the months between two dates (start date and end date). The start date and end date are both properties of another dimension (PRICELIST), and will vary by member. As for the rest of the dimensions, the values will be the same as the ones copied:
How can I retrieve the list of members of the Date dimension on which to write the data copied from "000000"?
I tried the following code:
DATA ([d/Measures] = "LIST",
[d/Date] = PERIOD ([d/PRICELIST].[p/VALID_FROM])
TO
PERIOD ([d/PRICELIST].[p/VALID_TO])) =
RESULTLOOKUP ([d/Measures] = "LIST",[d/Date]="000000")
But it gives me the error "Mismatching input TO". It does not seem to acknowledge the "TO" keyword.
Any ideas?
Thanks in advance
Request clarification before answering.
fffma
I am assuming your initial value of 20 is on PRICELIST member L01. Something like below should work. Just adjust as per your model and dimension name. You can change the MEMBERSET for the Date as per your planning horizon.
MEMBERSET [d/Date] = "202301” TO "202312”
MEMBERSET[d/Measures] = "LIST"
FOREACH [d/Date]
IF DATEDIFF([d/PRICELIST].[p/VALID_FROM], [d/Date], “MONTH”) >= 0 AND DATEDIFF([d/Date], [d/PRICELIST].[p/VALID_TO], “MONTH”) > 0 THEN
DATA()=RESULTLOOKUP ([d/Date]="000000")
ENDIF
ENDFOR
Hope this helps !!
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 |
---|---|
74 | |
30 | |
9 | |
7 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.