Creating a Cumulative Concat Function on a Text Field
I currently have an ETL looking at distinct Opportunities by their close won day. However, this issue is now looking at Distinct accounts within the same dataset. At first, I thought to use the count distinct function on the account ID in a groupby. However, since multiple opps can be tied to one account and each one can have different close dates, I know this would cause the account ID to be counted multiple times instead of once. Could it be possible to instead concat the Account ID by the Opp close won date and have it be cumulative as a list format to where it would list previous accounts as well? From there, I can use a count distinct function, and if that account ID is shown more than once, then it won't be counted twice. I know cumulative functions can be done in the rank and window tile for INT values, but this is a bit different.
Best Answer
-
If I understand correctly, you want a count of Account IDs by close date, but if an account ID appears for more than one close date, you only want them counted for a single close date.
If that's correct, I would split this into two parts, first figure out which repetition of the Account ID you want to include, and then count them by close date.
For example, if you only want to use the most recent close date for a given account ID, use a rank tile to rank the account IDs by descending close date, using account ID as the window. Then a filter tile for rank=1 to get only the most recent Account ID. (Or maybe you only want to include the close date with the highest value, you could use that to rank it).
From there, you could count your Account ID by close date using a group-by.
Please 💡/💖/👍/😊 this post if you read it and found it helpful.
Please accept the answer if it solved your problem.
0
Answers
-
If I understand correctly, you want a count of Account IDs by close date, but if an account ID appears for more than one close date, you only want them counted for a single close date.
If that's correct, I would split this into two parts, first figure out which repetition of the Account ID you want to include, and then count them by close date.
For example, if you only want to use the most recent close date for a given account ID, use a rank tile to rank the account IDs by descending close date, using account ID as the window. Then a filter tile for rank=1 to get only the most recent Account ID. (Or maybe you only want to include the close date with the highest value, you could use that to rank it).
From there, you could count your Account ID by close date using a group-by.
Please 💡/💖/👍/😊 this post if you read it and found it helpful.
Please accept the answer if it solved your problem.
0
Categories
- All Categories
- 1.8K Product Ideas
- 1.8K Ideas Exchange
- 1.6K Connect
- 1.2K Connectors
- 300 Workbench
- 6 Cloud Amplifier
- 9 Federated
- 2.9K Transform
- 102 SQL DataFlows
- 626 Datasets
- 2.2K Magic ETL
- 3.9K Visualize
- 2.5K Charting
- 753 Beast Mode
- 61 App Studio
- 41 Variables
- 692 Automate
- 177 Apps
- 456 APIs & Domo Developer
- 49 Workflows
- 10 DomoAI
- 38 Predict
- 16 Jupyter Workspaces
- 22 R & Python Tiles
- 398 Distribute
- 115 Domo Everywhere
- 276 Scheduled Reports
- 7 Software Integrations
- 130 Manage
- 127 Governance & Security
- 8 Domo Community Gallery
- 38 Product Releases
- 11 Domo University
- 5.4K Community Forums
- 40 Getting Started
- 30 Community Member Introductions
- 110 Community Announcements
- 4.8K Archive