Hi Everyone,
I have product codes as dimensions in SAP Analytics Cloud (SAC). I want to filter these codes to show only those where the 13th digit is āCā using scripting.
Can anyone help me with how to achieve this in SAC?
Thanks in advance!
Request clarification before answering.
You have not mentioned where you want to show these filtered product codes. If you want to display them in stories, you could create a calculated dimension and use that to filter the list. If this filtering requirement is something which you will do quite often, its advisable you add an attribute to your product dimension and flag it so that you have a universal filter for all stories and calculation.
IF(SUBSTRING([d/"MODEL":PRODUCT].[p/ID],13 ,1)="C" ,"Contains C" ,"NA" )Also you have to ensure all product members length are more than 13. Else try to check the length first in the formula. Also the position might be 12 or 13 based on index starting at 0 or 1.
Hope this helps !
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 |
|---|---|
| 5 | |
| 5 | |
| 4 | |
| 3 | |
| 2 | |
| 2 | |
| 2 | |
| 2 | |
| 2 | |
| 2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.