on 2025 Sep 01 5:45 PM
Dear Community,
Option 1
We start from a situation like the one shown in the table below.
| ACCOUNT | VIEW | ENTITY | DATASOURCE | DF | CUST | CH | CC | MARK | PR | TC | SC | INT | Amount |
| ACCOUNT1 | V00R | CX20 | INP | STK | DEL | RET | # | CN | FTB998 | CNY | COMM | # | 1000 |
| ACCOUNT1 | V00R | CX20 | ADD | STK | DEL | RET | CNY | CN | FTB998 | CNY | COMM | # | 1000 |
| ACCOUNT1 | V00R | CX20 | ADD | STK | DEL | RET | EUR | CN | FTB998 | CNY | COMM | # | 1000 |
| ACCOUNT1 | V00R | CX20 | ADD | STK | DEL | RET | IDR | CN | FTB998 | CNY | COMM | # | 1000 |
| ACCOUNT1 | V00R | CX20 | ADD | STK | DEL | RET | INR | CN | FTB998 | CNY | COMM | # | 1000 |
| ACCOUNT1 | V00R | CX20 | ADD | STK | DEL | RET | JPY | CN | FTB998 | CNY | COMM | # | 1000 |
| ACCOUNT1 | V00R | CX20 | ADD | STK | DEL | RET | SGD | CN | FTB998 | CNY | COMM | # | 1000 |
| ACCOUNT1 | V00R | CX20 | ADD | STK | DEL | RET | USD | CN | FTB998 | CNY | COMM | # | 1000 |
| ACCOUNT1 | V00R | CX20 | ADD | STK | DEL | RET | VND | CN | FTB998 | CNY | COMM | # | 1000 |
| ACCOUNT1 | # | CX20 | INP | STK | # | # | CNY | # | FTB998 | # | # | # | 1000 |
The requirement is to selectively delete the ADD rows; the only rows that should remain are those with equal PR and CC values (as in the final table).
| ACCOUNT | VIEW | ENTITY | DATASOURCE | DF | CUST | CH | CC | MARK | PR | TC | SC | INT | Amount |
| ACCOUNT1 | V00R | CX20 | ADD | STK | DEL | RET | CNY | CN | FTB998 | CNY | COMM | # | 1000 |
| ACCOUNT1 | # | CX20 | INP | STK | # | # | CNY | # | FTB998 | # | # | # | 1000 |
Option 2
We start from a situation such as that shown in the table
| ACCOUNT | VIEW | ENTITY | DATASOURCE | DF | CUST | CH | CC | MARK | PR | TC | SC | INT | Amount |
| ACCOUNT1 | V00R | CX20 | INP | STK | DEL | RET | # | CN | FTB998 | CNY | COMM | # | 1000 |
| ACCOUNT1 | # | CX20 | INP | STK | # | # | CNY | # | FTB998 | # | # | # | 1000 |
Here, the requirement is to report where CC = # is present, the same CC present in the row where the following dimensions are the same: ENTITY, DATASOURCE, DF, PR.
In this case, the result would be as follows
| ACCOUNT | VIEW | ENTITY | DATASOURCE | DF | CUST | CH | CC | MARK | PR | TC | SC | INT | Amount |
| ACCOUNT1 | V00R | CX20 | INP | STK | DEL | RET | CNY | CN | FTB998 | CNY | COMM | # | 1000 |
| ACCOUNT1 | # | CX20 | INP | STK | # | # | CNY | # | FTB998 | # | # | # | 1000 |
Would either option work? What Data Action (Advanced Formula) needs to be created to achieve this result?
Obviously, these are sample data; in the data set there are more PRs and different combinations.
Thank you
Request clarification before answering.
@andreag412 For Option 1 , I think you want to delete the data where currency is not the same as Local currency of the market. In your sample data its CNY for Market CN. If your market dimension has an attribute for currency with value CN, the below sample Data Action logic can work. For both Option 1 and 2 Assumption is Currency attribute in MARK is set to CNY
MEMBERSET [d/DATASOURCE]="ADD"
IF [d/MARK].[p/Currency] != [d/CC].[p/id] THEN
DELETE()
ENDIFFor Option 2
MEMBERSET [d/DATASOURCE]="INP"
MEMBERSET [d/CC]="#"
DATA([d/CC]=[d/MARK].[p/Currency])=RSEULTLOOKUP([d/CC]="#")
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 |
|---|---|
| 15 | |
| 9 | |
| 6 | |
| 5 | |
| 4 | |
| 4 | |
| 3 | |
| 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.