cancel
Showing results for 
Search instead for 
Did you mean: 

Sap analytics cloud advanced formulas attributes

former_member710627
Participant
0 Kudos

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()

capture2.png

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.

capture3.png

Accepted Solutions (0)

Answers (1)

Answers (1)

N1kh1l
Active Contributor

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