on 2025 Feb 08 9:41 AM
Dear all,
I am currently working on a problem in SAC where I am looking to optimize my solution.
I have a customer with a very specific expectation. For simplification reasons let us assume the SAC model has one dimension called "User" with 2 properties "CostCenter" and "WFH Flag". The model has one measure called "Counter" which is currently blank. Now the customer wants to fill this measure, so that for each user you are able to see the count of the CostCenter and WFH Flag.
Before:
| User | Cost Center | WFH Flag | Counter |
| A | 1 | Remote | - |
| B | 1 | Remote | - |
| C | 1 | Hybrid | - |
| D | 2 | Office | - |
| E | 2 | Office | - |
| F | 2 | Office | - |
| G | 3 | Remote | - |
After:
| User | Cost Center | WFH Flag | Counter |
| A | 1 | Remote | 2 |
| B | 1 | Remote | 2 |
| C | 1 | Hybrid | 1 |
| D | 2 | Office | 3 |
| E | 2 | Office | 3 |
| F | 2 | Office | 3 |
| G | 3 | Remote | 1 |
I have created this solution by looping through the user dimension, counting the concatenated string of CostCenter and Flag. Then I place it into a property of the user dimension which I write to a measure via data action.
This approach is fine if you have a few users. But with thousands of users it will take some time.
Is there a better approach for example using data action functionalities? I was thinking of having a loop in the DTAs but I did not manage to get it.
Thank you!
Request clarification before answering.
| User | Count |
|---|---|
| 7 | |
| 5 | |
| 5 | |
| 4 | |
| 3 | |
| 3 | |
| 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.