Way to sort by hidden field
Is there a way to sort a table by a field that isn't in the table columns? I'm trying to sort time information chronologically like this:
1:00 AM
2:00 AM
…
12:00 PM
1:00 PM
But Domo sorts it like this:
1:00 AM
1:00 PM
2:00 AM
2:00 PM
etc.
I can have the time displayed as 24-hour but I'd rather not if possible.
Answers
-
Domo is doing string sorting and not numerical sorting because you value is a string. You can create a beast mode to calculate the numerical hour value (if you don't already have it) and then use that in the sorting section instead of your actual display hour string you currently are using. This way it will display how you want with the correct format but be sorted numerically.
**Was this post helpful? Click Agree or Like below**
**Did this solve your problem? Accept it as a solution!**0 -
The field I'm sorting by is a BM calculation: TIME_FORMAT('fieldname', '%h:%i, %p'). Does that return a string value?
0 -
It does. If fieldname is a timestamp you can just do this to get the numerical equivalent
HOUR(`fieldname`)
**Was this post helpful? Click Agree or Like below**
**Did this solve your problem? Accept it as a solution!**0 -
Yeah, but I want the time in the format I posted earlier, like 1:24 PM. Just the hour isn't enough. I can create a BM field with HOUR('fieldname') and sort by it to get it in the right order, but I don't want that field to appear in the table since it'd be redundant.
0 -
That's fine, you'd just need two different beast modes, one for display and one for sorting. Have the display on your table and the sort in your sorting options on the card.
**Was this post helpful? Click Agree or Like below**
**Did this solve your problem? Accept it as a solution!**0 -
How do I do that? I have a current field I'm sorting by but I can't seem to remove it.
0
Categories
- All Categories
- 1.8K Product Ideas
- 1.8K Ideas Exchange
- 1.6K Connect
- 1.2K Connectors
- 300 Workbench
- 6 Cloud Amplifier
- 9 Federated
- 2.9K Transform
- 102 SQL DataFlows
- 626 Datasets
- 2.2K Magic ETL
- 3.9K Visualize
- 2.5K Charting
- 753 Beast Mode
- 61 App Studio
- 41 Variables
- 692 Automate
- 177 Apps
- 456 APIs & Domo Developer
- 49 Workflows
- 10 DomoAI
- 38 Predict
- 16 Jupyter Workspaces
- 22 R & Python Tiles
- 398 Distribute
- 115 Domo Everywhere
- 276 Scheduled Reports
- 7 Software Integrations
- 130 Manage
- 127 Governance & Security
- 8 Domo Community Gallery
- 38 Product Releases
- 11 Domo University
- 5.4K Community Forums
- 40 Getting Started
- 30 Community Member Introductions
- 110 Community Announcements
- 4.8K Archive