Sorting Year date Filter in Ascending order
Hi All,
I have a beast mode created as CONCAT(YEAR(`pickupDATE`),'-',MONTHNAME(`pickupDATE`)) which in turn returns values such as 2020-April, 2020-june and so on...When I try to display this as a quick filter I get the values displayed in the quick filter in my card in random order -such as
2020-April
2020-August
2020-December
and so on....Can you please let me know how to display these values in ascending order in my quick filter as below
2020-April
2020-May
2020-June
2020-July
and so on...
Thanks,
Arun
Comments
-
Since you are using the month name, it is sorting alphabetically. I think you could just sort by pickup_date to sort it in date order. Otherwise, if you want the month name in your display, I would create a second beast mode for sorting on using the year and month number: CONCAT(YEAR(`pickupDATE`),'-',MONTH(`pickupDATE`)).
0 -
I tried the beast mode like this :CONCAT(YEAR(`REQ_PIC_DATE`),'-',MONTHNAME(`REQ_PIC_DATE`))
order by YEAR(`REQ_PIC_DATE`),MONTHNAME(`REQ_PIC_DATE`)...But its invalid...
0 -
Quick filters to do not pay any attention to the sorting properties, unfortunately. They are treated as strings and will always sort ascending. Your best bet is to have your values be Year-Month, with the month always being 2 digits. You can do that like this:
DATE_FORMAT(`datefield`,'%Y-%m')
This should return it as 2022-04 for April 2022.
**Check out my Domo Tips & Tricks Videos
**Make sure to any users posts that helped you.
**Please mark as accepted the ones who solved your issue.2 -
Thanks @MarkSnodgrass !..This works..Appreciate your help!
1
Categories
- All Categories
- 1.7K Product Ideas
- 1.7K Ideas Exchange
- 1.5K Connect
- 1.2K Connectors
- 295 Workbench
- 6 Cloud Amplifier
- 8 Federated
- 2.8K Transform
- 98 SQL DataFlows
- 608 Datasets
- 2.1K Magic ETL
- 3.8K Visualize
- 2.5K Charting
- 713 Beast Mode
- 50 App Studio
- 39 Variables
- 669 Automate
- 170 Apps
- 447 APIs & Domo Developer
- 45 Workflows
- 7 DomoAI
- 34 Predict
- 14 Jupyter Workspaces
- 20 R & Python Tiles
- 391 Distribute
- 111 Domo Everywhere
- 274 Scheduled Reports
- 6 Software Integrations
- 116 Manage
- 113 Governance & Security
- Domo Community Gallery
- 31 Product Releases
- 9 Domo University
- 5.3K Community Forums
- 40 Getting Started
- 30 Community Member Introductions
- 104 Community Announcements
- 4.8K Archive