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.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