on 07-25-2022 9:40 PM
Hello,
I am trying to create a data action that deletes fact data based on a dimension attribute,
attach an example of what i am trying to do capture.png
I try to configure a data action setting as a context the dimension attribute, but it seems that the data action ignore the context
MEMBERSET[d/ZPQ_SAC_S4H_CeBes].[p/Activo] = "x"
DELETE()
I also try to put a condition in the graphical editor, but again it seems that the data action ignore the attribute, and either it delete all facts, or it deletes nothing.
ricardo.moreno.altamirano
Try something like below. I am deleting products which have property DELETE marked as X. Other filters are just to scope relevant records.MEMBERSET [d/NA_ACCOUNT] = "Quantity"
MEMBERSET [d/Date] = "202001" TO "202012"
MEMBERSET [d/NA_ORGANISATION] = "DE"
IF [d/NA_PRODUCT].[p/DELETE]="X" THEN
//DATA()=0 // Use this if you want to make it 0
DELETE()
ENDIF
//--------------------------------------------
//Even this version of script worked as expected
MEMBERSET [d/NA_ACCOUNT] = "Quantity"
MEMBERSET [d/Date] = "202001" TO "202012"
MEMBERSET [d/NA_ORGANISATION] = "DE"
MEMBERSET [d/NA_PRODUCT].[p/DELETE]="X"
//DATA()=0 // Use this if you want to make it 0
DELETE()
Data Before Delete.
Product Marked as X (to be deleted)
After the Data Action Run
Please Upvote/Accept if this helps you.
Regards
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 |
---|---|
82 | |
11 | |
10 | |
8 | |
6 | |
6 | |
6 | |
6 | |
5 | |
5 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.