replicating Google Analytics’ Time Format in DOMO
I want to show Time on Site (and ither metrics that report in minutes and seconds) the way Google Analytics does, but it shows up in DOMO as number of seconds.
Is there a solution at the connector level and is there a solution at the beastmode level (something I could do on the fly for reports do yesterday)?
Thanks all,
Best Answer

If you want to display the time on site data as minutescolonseconds (e.g. 2:30, instead of 150) you could use a beast mode like this:
CONCAT(FLOOR(`Time_On_Site_Field` / 60), ':' , MOD(`Time_On_Site_Field`, 60))
Note, however, that this will turn the output into text for display and you will no longer be able to do math on it.
If you need to use this in a sum, you can also add that to the beast mode like this:
CONCAT(FLOOR(SUM(`Time_On_Site_Field`) / 60), ':' , MOD(SUM(`Time_On_Site_Field`), 60))
The floor function is used to round down the division of the time on site divided by 60 to get hours. The MOD function returns only the remainder after the division of the time on site divided by 60 to get minutes.
I hope that helps!
3
Answers

If you want to display the time on site data as minutescolonseconds (e.g. 2:30, instead of 150) you could use a beast mode like this:
CONCAT(FLOOR(`Time_On_Site_Field` / 60), ':' , MOD(`Time_On_Site_Field`, 60))
Note, however, that this will turn the output into text for display and you will no longer be able to do math on it.
If you need to use this in a sum, you can also add that to the beast mode like this:
CONCAT(FLOOR(SUM(`Time_On_Site_Field`) / 60), ':' , MOD(SUM(`Time_On_Site_Field`), 60))
The floor function is used to round down the division of the time on site divided by 60 to get hours. The MOD function returns only the remainder after the division of the time on site divided by 60 to get minutes.
I hope that helps!
3 
Hey
Thanks! This is very helpful.
But after the calculation, the metric becomes a dimension.
How can I show the avg session time by month in a card?
Many thanks!
0 
There isn't a way to graph this data as a metric after converting it to minutescolonseconds format. If you want to graph the average session time by month, you'd need to pick a single unit of time (seconds, minutes, or hours) as your metric and convert the data to that unit (seconds\60 = minutes). Then you're graphing average session time in minutes per month.
0
Categories
 10.5K All Categories
 3 Connect
 913 Connectors
 250 Workbench
 458 Transform
 1.7K Magic ETL
 69 SQL DataFlows
 476 Datasets
 182 Visualize
 249 Beast Mode
 2.1K Charting
 11 Variables
 16 Automate
 354 APIs & Domo Developer
 88 Apps
 3 Workflows
 20 Predict
 5 Jupyter Workspaces
 15 R & Python Tiles
 245 Distribute
 62 Domo Everywhere
 242 Scheduled Reports
 20 Manage
 41 Governance & Security
 168 Product Ideas
 1.2K Ideas Exchange
 9 Community Forums
 27 Getting Started
 14 Community Member Introductions
 55 Community News
 4.5K Archive