I got struck here can anybody help me?
Magic ETL Activity
Using the DataSet in Domo you created using Workbench in the previous activity,
1. Use Magic ETL to parse the currency code from the "Transaction Amount" column and separate the amount and the currency code into separate columns.
Submit: A screenshot of the output of the data showing the different columns created.
2. Calculate the average time between orders. For each record in the DataSet, add a field showing the number of days since the previous order for that customer.
Submit: A screenshot of which customer has the longest average time between orders and what is the average number of days?
Best Answer
-
Sounds interesting. Is this question coming from a school or training exercise?
- Parsing the Currency Code and Amount:
- As your screenshot shows, you can use the split column tile toseparate based on a delimiter (space or symbol that separates the code and amount) and then a formula tile to clean up or reformat the separated values.
Your screenshot shows a regular expression but I don't think Domo supports using regex pattersn in the way shown. The first formula appears to be trying to extract the numeric value followed by a currency code. The second appears to be attempting a regular expression to match three uppercase letters.
- As your screenshot shows, you can use the split column tile toseparate based on a delimiter (space or symbol that separates the code and amount) and then a formula tile to clean up or reformat the separated values.
- Calculating Average Time Between Orders:
- To find the time between orders, you can try using a Rank and Window tile to sort the orders by date.
- Then, use a date difference formula to calculate the number of days between the current and previous order for the same customer.
- Once you have those differences, aggregate them with a "Group By" tile to find the average time between orders for each customer.
- Sorry….I can't get "code block" to work in this post. I can only type. Your regular expressions might be done something like:
- REGEX(
Transaction Amount
, '\d+\.\d+')
REGEX(Transaction Amount
, '[A-Z]{3}')
** Was this post helpful? Click Agree or Like below. **
** Did this solve your problem? Accept it as a solution! **1 - Parsing the Currency Code and Amount:
Answers
-
Sounds interesting. Is this question coming from a school or training exercise?
- Parsing the Currency Code and Amount:
- As your screenshot shows, you can use the split column tile toseparate based on a delimiter (space or symbol that separates the code and amount) and then a formula tile to clean up or reformat the separated values.
Your screenshot shows a regular expression but I don't think Domo supports using regex pattersn in the way shown. The first formula appears to be trying to extract the numeric value followed by a currency code. The second appears to be attempting a regular expression to match three uppercase letters.
- As your screenshot shows, you can use the split column tile toseparate based on a delimiter (space or symbol that separates the code and amount) and then a formula tile to clean up or reformat the separated values.
- Calculating Average Time Between Orders:
- To find the time between orders, you can try using a Rank and Window tile to sort the orders by date.
- Then, use a date difference formula to calculate the number of days between the current and previous order for the same customer.
- Once you have those differences, aggregate them with a "Group By" tile to find the average time between orders for each customer.
- Sorry….I can't get "code block" to work in this post. I can only type. Your regular expressions might be done something like:
- REGEX(
Transaction Amount
, '\d+\.\d+')
REGEX(Transaction Amount
, '[A-Z]{3}')
** Was this post helpful? Click Agree or Like below. **
** Did this solve your problem? Accept it as a solution! **1 - Parsing the Currency Code and Amount:
-
I got the answer, thanks a lot sir☺️
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