Best Of
Re: Why have the dates changed?
@damen I have run into issues where I have a lot of historical data and if the date range filter is set to graph by year, it does not go all the way back. Support once told me that it has to do with their calendar system behind the scenes.
I was able to get around it by creating a beast mode that extracts the year from the date field that is on the x-axis and then put that beast mode field on the x-axis. The beast mode is simply YEAR(`datefield`) . See if that works for you.
Re: Flow for dates
Can I answer awesome 10 times? Thank you so much Mark. This was truly helpful and thanks for making a video so it is even clearer.
Re: Flow for dates
You are going to want to utilize the Domo Dimensions Connector and the Calendar dataset to build out your months that are in between your start and end dates to create new rows. You would do this in Magic ETL. I've created a video that shows you how to do it.
This is what your ETL would look like.
Hope this helps.
Re: Create beast mode dates
The STR_TO_DATE function is going to be your friend in this case. Try this for your beast modes.
Start
STR_TO_DATE( CONCAT( REPLACE( REPLACE( REPLACE( REPLACE(`Start`,'th','') ,'st','') ,'nd','') ,'rd','') ,' ',YEAR(CURRENT_DATE()) ),'%b %d %Y')
Stop
STR_TO_DATE( CONCAT( REPLACE( REPLACE( REPLACE( REPLACE(`Stop`,'th','') ,'st','') ,'nd','') ,'rd','') ,' ',YEAR(CURRENT_DATE()) ),'%b %d %Y')
Here's the breakdown of what I'm doing from the inside out.
Use the replace function multiple times to remove the th, rd, st, nd from the day of the month.
Add the current year by using the year function and the current date function so you have a complete date.
Use the concat function to build a string that would look something like this: Apr 4 2022
Use the str_to_date function to convert that to a standard date. The %b %d %Y informs the function what format the string is currently in.
Hope that makes sense.
Re: SQL variables with spaces in them?
For MySQL use the backtick character ` (not apostrophe- that creates a string) surrounding your column names.
ie
SELECT
`trade show`
,`contact person`
FROM
my_data_flow
That should also turn the name of your column light blue so you can tell that it worked.
Re: How to solve this problem in Magic ETL - Link items to Header rows
Hi Skhatri, that certainly is a limited ad platform dataset. You can join header data to the daily ad rows even though they're only associated by row placement, but it's heavy on the assumption that these sort of daily rows repeat in this same fashion throughout the input.
Here is my start dataset and output dataset:
Here are the transform steps:
1 - set a constant of 1 (this is used in both the Row Number function and the join)
2 - use Rank & Window tile to get RowNum based on the constant 1.
3 - split the headers and daily rows into two opposing filters. Based on your sample I looked for the "-" character in the Campaign column.
4 - in the top header path, do a LEAD function on RowNum. Now you have the header's original RowNum as well as the RowNum associated with the next header.
5 - the HeaderLead of the last header will be null, so set it to something wildly high for your purpose (ex. 1,000,000). That way you have something to filter between later.
6 - join header and daily rows back together on the constant 1. This is a lazy/greedy join that puts all daily rows on all headers.
7 - in the last filter, include rows where the daily RowNum is greater than the Header Start Row number AND daily RowNum is less than HeaderLead value. That's saying, only keep daily rows that are between their header and the next header.
8 - any column cleanup, rearrange, you want in the last select tile. Might need to change your date from a string into a date too depending on how that came in from your input.
Couple key screenshots along with the whole transform layout -
Here's step 5, shows how you get a range on the header that can be used to filter down the day rows:
Step 6, showing the daily RowNum in between the header start (the header's original RowNum) and header lead values. You can see for the last ad/campaign header I set it's lead value to 1,000,000 to allow the filter to work.
Re: Formatting a single number card
@damen Under General chart properties, set Divide Value By to 'None'.
Re: Weeks one week different
Hi @AdamC do you know if you have a fiscal calendar enabled on your instance? If you don't, then Domo's native week groupings consider Week 1 as January 1 through the end of that calendar week. Since January 1, 2022 was a Saturday, Week 1 2022 is comprised of just one day by this logic, which may differ than your company's fiscal weeks. Domo's Fiscal Calendars give you the ability to customize how to group fiscal weeks, periods, quarters, and years.
https://domohelp.domo.com/hc/en-us/articles/360042924254-Using-a-Fiscal-Calendar
Re: Period Over Period Multi-Value cards zeroing out when user changes the date
@Joe_M I have experienced this as well so have decided to not use the native period over period controls. (Although they are very nice)
@GrantSmith has posted a solution for this that allows for much greater control and flexibility. https://dojo.domo.com/main/discussion/53481/a-more-flexible-way-to-do-period-over-period-comparisons#latest
The only downside is your dataset can become very large.
Good luck.
Re: Period Over Period Multi-Value cards zeroing out when user changes the date
When the page level filter is applied it is ignoring all of the old data and only filtering for those exact dates. The prior year or month data is filtered out which is why you're getting nothing for those card. This is why I will create my own date dimension table to better handle period over period type comparisons as @Jones01 mentioned.








