Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have a multi-conditional data substitution,
Would you like to ask whether to write in a script or in a chart?
I want to get the picture
I have uploaded the attachment
You're welcome @qingkong . Glad I could help.
If you could mark the problem solved it will help others looking for solutions to similar issues.
Thanks
Anthony
Hi,
If I've understood your request correctly and you're looking for the "Replacement Values" to be in the same column, an applymap() function in the load script will do this for you:
For example:
ReplacementMap:
mapping
load * inline [
Replace Value
P101 ROH WH
P102 ROH WH
P103 ROH WH
P104 ROH WH
P105 ROH WH
P106 ROH WH
P107 ROH WH
P108 ROH WH
P109 ROH WH
P110 ROH WH
P111 ROH WH
P401 ROH WH
P402 ROH WH
P301 ROH MFG
P302 ROH MFG
P303 ROH MFG
P304 ROH MFG
P305 ROH MFG
P306 ROH MFG
P307 ROH MFG
P308 ROH MFG
](delimiter is '\t');
And then you apply it to your data.
data:
load *,
applymap('ReplacementMap', SLoc, SLoc) as SLoc2
From YourData;
I think this would be the easiest way. Other options can be done in the charts but it would be a nested "if" and match statements.
Regards
Anthony
Dell : Anthony thank you Problem solved
You're welcome @qingkong . Glad I could help.
If you could mark the problem solved it will help others looking for solutions to similar issues.
Thanks
Anthony