Best Of
Re: Count Attribute Instances instead of Projects
It's always helpful to have a small sample of the dataset to help understand the structure of the data. However, from your description of the fields, I'm assuming that your data may look something like this:
With each project having a single row of data and multiple columns of data that contain the different "go live" dates for that project.
What I think you will need to do is to use an ETL to convert your data to look more like this:
With one row of data per project, per GoLive number.
You could even then add calculations to the ETL to determine the Year for Actual Go Live and if the project was On Time.
This data structure will give you a separate count for each time a project has a Go Live that is on time versus delayed.
Re: Count Attribute Instances instead of Projects
I might be wrong, so right now your Dataset would be pivoted, so in a single Row per project you have up to 9 possible Go-Live Dates (with Initial and Actual) for each. Something like:
There are 2 approaches I can think of for this:
Beast Mode approach:
One that will return the number of times it was completed within the given window, which would look something like this but with 6 more lines for the other possible dates:
CASE WHEN YEAR(Actual Date1)=2023 AND Actual Date1 <= DATE_ADD(Initial Date1,INTERVAL 25 DAY) THEN 1 ELSE 0 END + CASE WHEN YEAR(`Actual Date2`)=2023 AND `Actual Date2` <= DATE_ADD(`Initial Date2`,INTERVAL 25 DAY) THEN 1 ELSE 0 END + CASE WHEN YEAR(`Actual Date3`)=2023 AND `Actual Date3` <= DATE_ADD(`Initial Date3`,INTERVAL 25 DAY) THEN 1 ELSE 0 END
Then a best mode to tell you the number of the dates that fall in the period, regardless of whether or not they were completed in the 25 days period:
CASE WHEN YEAR(Actual Date1)=2023 THEN 1 ELSE 0 END
+ CASE WHEN YEAR(Actual Date2)=2023 THEN 1 ELSE 0 END
+ CASE WHEN YEAR(Actual Date3)=2023 THEN 1 ELSE 0 END
And in your graphs you can do a SUM of these fields to get the total you'd expect. You can make this more versatile by having the Year and the Interval be Variables rather than hardcoded, so you don't have to redo if someone later ask, what about things that we achieve in a 7 day window rather than 25, or what if I want to know for 2022 instead of 2023. This with the table explained above will yield the following results:
ETL approach to unpivot (overkill for this request IMHO)
Then your ETL would look something like this (I know there might be more efficient ways out there, but this should do the trick):
The Make Date Pairsjust concatenates the actual and initial date for each of your possible options.
In the Select Columns, we choose only the key project information we want to keep available for charts plus the Pairs we created earlier. In the Dynamic Unpivot you select all the columns except the pairs as values that will not be pivoted.
Then we split the columns again with the Split Columns to get separate value and we force them to be treated as Dates by setting up their type with Alter Columns
Optional: This approach will create one row for each date, so 9 rows per Project. You can apply a filter rows first to only keep the dates for which you have value pairs.
You'd build your card from this new dataset instead, and you'll only compare the number of times Actual Date is less than Initial Date.
Hope this helps,
Marcel Lüthi
Re: Average of a difference in Timestamps
Working with dates can be tricky, and while TIMEDIFF can work, I've found using UNIX_TIMESTAMP to work best.
UNIX_TIMESTAMP(Date1)-UNIX_TIMESTAMP(Date2)
This will give you the time difference in seconds, if you want it to be minutes you just divide by 60, for hours by 3600 (60*60) or 86400 (60*60*24) for days.
You might want to perform additional checks to see if a date is NULL or not, as NULLs will make the operation to return NULL which might not always be the desired outcome.
Re: Is it possible to load card data in google sheets using the DOMO Google Sheets extension?
If you want to power a card from data stored in a Google Sheet, you can use the Google Sheets Connector. There is also the Google Sheets Writeback Tile if you want your Google Sheet to be populated from a Domo Dataset, you can use the Google Sheets Writeback Tile.
Re: Can I combine columns to create one column for a pie chart/bar graph visual?
You can use a dataflow / magic Etl to pivot your dataset so that you have the columns member and event and signed up and then filter for signed up = TRUE
You can then use that output dataset in your pie chart with the event as the series and do a count of the members
Re: SQL formula for blank cells
Alternatively you can combine both together and use a coalesce and NULLIF
COALESCE(NULLIF(TRIM(`fieldname `), ''), 0)














