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.5K Connect
- 1.2K Connectors
- 300 Workbench
- 6 Cloud Amplifier
- 8 Federated
- 2.9K Transform
- 100 SQL DataFlows
- 616 Datasets
- 2.2K Magic ETL
- 3.9K Visualize
- 2.5K Charting
- 738 Beast Mode
- 57 App Studio
- 40 Variables
- 685 Automate
- 176 Apps
- 452 APIs & Domo Developer
- 47 Workflows
- 10 DomoAI
- 36 Predict
- 15 Jupyter Workspaces
- 21 R & Python Tiles
- 394 Distribute
- 113 Domo Everywhere
- 275 Scheduled Reports
- 6 Software Integrations
- 124 Manage
- 121 Governance & Security
- 8 Domo Community Gallery
- 38 Product Releases
- 10 Domo University
- 5.4K Community Forums
- 40 Getting Started
- 30 Community Member Introductions
- 108 Community Announcements
- 4.8K Archive