Best Of
Re: Remove lookback period from the data and see the values.
Thanks a lot @david_cunningham for the help!! I hope there was multi selection of reactions, so I could've selected 'Insightful', 'Like', 'Awesome'.
Re: Using regexp for pulling multiple values out a text string
Try something like this to make it a bit simpler:
REPLACE(REGEXP_REPLACE(SPLIT_PART(SPLIT_PART(``, 'Sent:', 1), 'To: ', 2), '[^<]+<([^>]+>)', '$1'), '>', ',')
SPLIT_PART(``, 'Sent:', 1)
Gets evertying in your string before 'Sent: ' - drops everything after it
SPLIT_PART(SPLIT_PART(``, 'Sent:', 1), 'To: ', 2)
Gets the entire text in between the To: and Sent: values so you're left with just the email addresses and the aliases
REGEXP_REPLACE(…, '[^<]+<([^>]+>)', '$1')
Finds all occurrences of the email addresses and any values outside of the < > and drops it in favor of what's in the < >. This keeps the trailing > so we can replace it with REPLACE in the last step with commas.
Re: Case Statement - 28 Days from a specific date?
I wanted to write up a more consolidated and easy to follow answer for anyone else curious about how to do this. This answer also expands on the requested functionality, by adding in a toggle that will allow users to flip between limiting the data based on a selected date, and showing all data. As well as allows users to specify the number of days to calculate back from the selected date.
We can use variables to allow users to select a date that will then limit the data shown. In this case, we are being asked to set it up so that the previous 28 days of data is shown based on the user selected date.
Step 1-1: Create a variable (SELECTED_DATE) that will be used as a control to let users select a date.
Step 1-2: Create another variable (USE_SELECTED_OR_ALL) that will be used as a control to let users toggle between selecting a date, and showing all data. Set up 2 options (Selected Date & All Dates) for this variable.
Step 2: Use the SELECTED_DATE and USE_SELECTED_OR_ALL variables in a case statement. This case statement will be used as a filter in Analyzer. I called this Beast Mode (RELEVANT_DATA_FILTER)
CASE
WHEN USE_SELECTED_OR_ALL = 'Selected Date'
THEN
CASE WHEN date >= DATE_SUB(SELECTED_DATE,interval 28 day) and date < SELECTED_DATE THEN 'Include' ELSE 'Exclude' END
ELSE 'Include'
END
Step 3: Use RELEVANT_DATA_FILTER as a filter on the card in Analyzer. You will want to select the value "Include" for the filter.
Step 4: Put your card on a dashboard, and then load in the controls so that users can interact with them.
If a user selects "All Dates" the card will show data for all dates. The cool thing here is that users will still be able to use the date range controls on the dashboard to control how the data is displayed (by day, month), and what range is displayed (current month, YTD, etc).
If a user selects "Selected Date" they can then select the date from which they want to show the previous 28 days of data from.
Note, you can change your variables default values. For example, you can set USE_SELECTED_OR_ALL to default to "All Dates" or "Selected Dates" depending on your use case.
You could take this even further, and create another variable (DAYS_TO_EVALUATE) that would let users dynamically change the number of days from the selected date that are shown. To do this, you would simply replace the hard-coded value of 28 in the case statement with your variable, and then include that variable on your dashboard as a control.
CASE
WHENUSE_SELECTED_OR_ALL= 'Selected Date'
THEN
CASE WHENdate>= DATE_SUB(SELECTED_DATE,interval DAYS_TO_EVALUATE day) anddate<SELECTED_DATETHEN 'Include' ELSE 'Exclude' END
ELSE 'Include'
END
Hope this is helpful to anyone who reads it! Feel free to reach out directly via message with any questions 😁
Re: Case Statement - 28 Days from a specific date?
@pauljames - that beast mode is included as an image above, but also pasting it below for your reference.
case when close_date >= DATE_SUB(START_DATE,interval 28 day) and close_date < START_DATE then 'Include' else 'Exclude' end
START_DATE is what I called the variable, and close_date is the dates you're filtering on with the control.
You would then filter on that beast mode in Analyzer to "Include" to make sure only dates that are 28 days from the selected date are shown.
Re: Case Statement - 28 Days from a specific date?
@pauljames - you can use variables to accomplish this.
So you would set up a variable that you could put on a dashboard as a control.
Then you would create a beast mode that references this variable (above)
You can see that above our data currently starts at 1/30 and goes back 28 days.
If I switch the date to 2/29, you can see that the data changes to start at 2/28 and goes back 28 days.
DomoXCanva Challenge Details
What: Get ready to unleash your creativity and technical prowess in the DomoXCanva Challenge! In this challenge, participants will create a visually stunning infographic in Canva that displays their most frequently viewed analytics from Domo. By leveraging a Domo App and integrating it with your Canva graphic, the metrics in the infographic will dynamically populate as they change. Consider this challenge as another powerful tool to add to your data visualization toolkit.
CHALLENGE EXAMPLE: Take a look at this dynamically-powered graphic we created for a real estate agent to get a quick view of her frequently-changing home/zip code data.
How: We've got you covered with all the resources you need to tackle this challenge with confidence:
- Step-by-Step Video Tutorial: Noah Finberg, Head of Developer Innovation at Domo, clearly walks through all steps of building out your DomoXCanva app. Start your challenge journey with the walkthrough video here!
- Step-by-Step Guide: Access our comprehensive document with detailed instructions on how to build your app using App Studio + Domo Custom App Framework.
- Canva Beginners Walkthrough: Dive into Canva with ease! Check out our beginner's video walkthrough to learn how to navigate and create stunning designs in Canva. Remember, Canva is a free tool designed to be user-friendly – no graphic design experience necessary.
- Domo office hours: @NoahFinberg, Head of Developer Innovation at Domo, has three days of office hours if you need 1:1 help building your solution. Look at the comments below for updated office hours.
- Share Your Solution: Showcase your work on your favorite platforms, however you’d like. Use #DoItWithDomo and tag @Domo so we can find and share from the Domo brand! Additionally, post your solution via the comments below to share with Domo's technical community.
- Submission details: Submitting your solution is easy. Just create a short walkthrough video to highlight your app and business use case solution. You can record or upload your video HERE on Vouch.
Why: Participating in the DomoXCanva Challenge offers a multitude of benefits:
- DomoXCanva badge: Want to grow your reputation in the Community? We'll award you with an exclusive badge + bonus points to your Community Forums profile for participating.
- Learn and Grow: Discover how easy it is to build an app in Domo's App Studio and brush up on your Domo Custom App Framework skills.
- 1:1 Assistance: Need help along the way? Our team of Domo developers is here to provide personalized assistance and support.
- Gain Credibility: By sharing your solution on social media using the hashtag #DoItWithDomo, you'll gain credibility in the data science community and showcase the power of the Domo platform.
- Amplification: Stand a chance to have your solution amplified by Domo on social media and in our Community Meet-ups, gaining recognition and visibility among your peers.
When: The CanvaXDomo Challenge is live from April 29th to May 17th. Ready to take on the challenge? Submit your app by May 17th using the instructions provided.
Are you ready to showcase your creativity and technical skills? Let's do it with Domo!
Re: Not sure which join to use
You can rename the fields in MagicETL. You just have 1 date from each datasource right?
So for example, if in Dataset 1 the date name is Date1 and in Dataset 2 the date name is Date2 you could rename the date field in each to be New Date. Then union the data together and Domo will match up the date columns as a single column.
Re: Returning a Max Result in a column
Try converting to a window function so that each row is compared to a single value instead of the aggregated value.
CASE WHEN `D's % of AOR` = MAX(`D's % of AOR`) OVER () THEN 1 ELSE 0 END












