Best Of
Re: calculate difference between two dates
Hi @user041053
You'll need to utilize a window function and a date diff function to calculate the difference between the two dates.
DATE_DIFF(`Date`, COALESCE(LAG(`Date`) OVER (ORDER BY `Date`)),`Date`))
DATE_DIFF is calculating the number of days between the two dates
LAG(`Date`) OVER (ORDER BY `Date`) gets the Date value from the prior row, ordered in ascending based on the Date value
COALESCE is defaulting the date to be either the prior date, or if it's null / the first record it will return the same date to get you a 0 difference.
Re: calculate difference between two dates
I'm working with too many different SQL version, so sorry! It should be DATEDIFF not DATE_DIFF.
Domo has some issues processing with the coalesce inside and not populating the date correctly. This modified version does the same and sets the difference to 0 if it's the first date in the partition.
COALESCE(DATEDIFF(`dt`, LAG(`dt`) OVER (ORDER BY `dt`)), 0)
Re: Julian Date
HI @user18189
Which format are your Julian dates in? YYDDD or YYYYDDD?
Since Julian dates count the number of days and doesn't use months you'd need some sort of DATE_ADD function call to add the number of days.
Re: Julian Date
Did that solve your problem? If so can you accept the answer so it's easier for others to find the solution in the future? Thanks!
Re: Is there any way we could replicate Multi-Row formula tile of Alteryx tool in Domo?
Hi @LoveBindal
Have you looked into Window functions? You can do it in either an ETL using the Rank and Window tile (https://domohelp.domo.com/hc/en-us/articles/360042922814-Magic-ETL-Tiles-Rank-and-Window) or you can use window functions within beast modes. Specifically utilizing LAG and LEAD will allow you to get the N prior row or the X next row. I've done a writeup of how to use LAG and/or LEAD for a rolling 3 day average here: https://dojo.domo.com/discussion/52679/domo-ideas-conference-beast-modes-rolling-averages#latest
Re: Is there any way we could replicate Multi-Row formula tile of Alteryx tool in Domo?
So this isn't easily possible however you could implement a mysql data flow using some creative hackery using variables. I was able to write up an example using your sample data you had provided to get the results you expected.
SELECT `Dept`,`Value`, COALESCE(`Value`, IF(`tbl`.`Dept`=@pred, @prev+@offset, @offset+@prev-1.1)) as new_value, @offset, CASE WHEN `Value` IS NOT NULL THEN @prev:=`Value` END prev, @pred:=`Dept` pred, @offset:=1+case when `Value` IS NULL THEN @offset ELSE 0 END new_offset FROM `tbl`, (SELECT @pred := null, @prev := null, @offset:=0) var_init
Essentially it's keeping track of how much offset to add if the current value is null. It's not a perfect working version but gives you an idea. If a new department starts with nulls it won't handle that scenario properly for the 2nd null row in a department.
Re: Ignore filters + include ALL entires of a specific measure in a formula, but filter other measures
Hi @pl_Luke
Have you looked into Segments?
https://domohelp.domo.com/hc/en-us/articles/4403089503383-Creating-Segments-in-Analyzer
Re: Saving filters
Currently there isn't a way to do it with embedded dashboards to have the filters persist across sessions. It's not currently possible in Domo proper. Programmatic filtering would be the closest you could get. My javascript/web development is limited but you might be able to track their filter options in the iframe and then save it off as a cookie and read the cookie when you first visit the page to pass those in as pfilters. This is completely theoretical. But as you stated pfilters will limit the overall dataset
Re: Issues connecting to Google Search Console with app connector
Sounds like an issue with the connector. You might want to reach out to Domo support. They typically will have additional logs to help diagnose your specific error you’re getting
Re: Issues connecting to Google Search Console with app connector
Support@domo.com is one way. You should be able to click the question icon in the upper right to to to the knowledge base and then select support in the upper right but like you I’ve had issues in the past attempting to log into the support site. Try the email.
