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 toany 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.1K Product Ideas
- 1.1K Ideas Exchange
- 1.2K Connect
- 968 Connectors
- 255 Workbench
- Cloud Amplifier
- 1 Federated
- 2.4K Transform
- 76 SQL DataFlows
- 500 Datasets
- 1.8K Magic ETL
- 2.7K Visualize
- 2.2K Charting
- 360 Beast Mode
- 19 Variables
- 483 Automate
- 101 Apps
- 378 APIs & Domo Developer
- 6 Workflows
- 22 Predict
- 6 Jupyter Workspaces
- 16 R & Python Tiles
- 316 Distribute
- 64 Domo Everywhere
- 252 Scheduled Reports
- 59 Manage
- 59 Governance & Security
- 1 Product Release Questions
- 5K Community Forums
- 37 Getting Started
- 23 Community Member Introductions
- 63 Community Announcements
- 4.8K Archive