cancel
Showing results for 
Search instead for 
Did you mean: 

How to copy data from different version using data actions in SAC with specific condition?

azm_azm
Participant
0 Kudos

Hi,

Here is the scenario. I want to copy data from source version to target version. There is a condition if version "A" then I need to copy from " A" from previous year but if the version is "B" then I need to copy from current year from "B" to my private version. Please refer below is the screenshot.

I have defined "X" as Version parameter but I'm not able to compare "X" with the version dimension using IF statement in data action.

Anyone who has faced similar kind of issue or knows the workaround in this case. Their comments would be deeply apprecaited.

Thaks.

Accepted Solutions (0)

Answers (1)

Answers (1)

N1kh1l
Active Contributor
0 Kudos

azm_azm

You will need a workaround.

Create an attribute Version_Type of type in Version dimension

Assign a numeric number code to all version members.

Create a parameter for source version in Data Action Advanced Formula.

Advanced Formula: You cannot compare the parameter directly in IF condition but you can check the attribute value of the parameter passed.



MEMBERSET [d/CALMONTH] = "202303" TO "202312"  // Adjust your periods
MEMBERSET [d/MEASURE]="QUANTITY"
MEMBERSET [d/SAP_CEP_PRODUCT]="B"


INTEGER @TYPE


@TYPE=ATTRIBUTE([d/Version].[p/Version_Type],%SourceVersion%)


IF @TYPE=1 THEN // If Type A then copying from previous year
	DATA()=RESULTLOOKUP([d/CALMONTH]=PREVIOUS(12),[d/Version]=%SourceVersion%)
ENDIF


IF @TYPE=2 THEN // If Type B then copying from  same year
	DATA()=RESULTLOOKUP([d/Version]=%SourceVersion%)
ENDIF

Output: Source Version : Actuals, Target : Plan (you can use your private version)

Output: Source Version : Budget, Target : Plan (you can use your private version)

Hope this helps !!

Please upvote/accept if this helps.

Nikhil