Custom sorting axes
Hey folks,
I'm looking to create a chart using DAY OF WEEK. However, I can only sort the axis by descending or ascending. I want to display the bars in the order of the days of the week.
Two questions about this problem:
1) Does anyone know how to modify this?
2) What does Domo use as the default to order, if I don't specify any sorting? (i.e. in my case it started with Friday, then Saturday, then Sunday, etc.) I would think Domo would use the order in which the entries appear in the database, but that's not the case - in my case, first entry was Wednesday.
3) Assuming none of this funtionality exists... can we add it to the product backlog? I think this would be useful.. not all metrics are presented alphabetical or numeric. Some examples that come to mind: city, day of week, different time periods that we assign names to, etc.
Comments
-
There is this recommendation of creating a Beast Mode:
Does anyone know of a simpler way?
0 -
Hi all,
Can anybody help out @phillipgornicki?
Thanks!0 -
@phillipgornicki,
I wanted to make sure the answer we discussed was also posted here in case anyone else had a similar question.
In order to sort by day of week you would have to create a beast mode filter that looks similar to this:
CASE
WHEN `column` = 'MONDAY' THEN 1
WHEN `column` = 'TUESDAY' THEN 2
WHEN `column` = 'WEDNESDAY' THEN 3
WHEN `column` = 'THURSDAY' THEN 4
WHEN `column` = 'FRIDAY' THEN 5
WHEN `column` = 'SATURDAY' THEN 6
WHEN `column` = 'SUNDAY' THEN 7
END
Also note that you may need to use the TRIM() function in case there are any extra white spaces.
Thank you.
Domo Employee
**Say "Thanks" by clicking the thumbs up in the post that helped you.
**Please mark the post that solves your problem by clicking on "Accept as Solution"1 -
When adding the custom sort to the "Sorting" field, it has no effect. Attached is a screenshot and below is the code created in beast mode....what am I missing?
@TylerC wrote:@phillipgornicki,
I wanted to make sure the answer we discussed was also posted here in case anyone else had a similar question.
In order to sort by day of week you would have to create a beast mode filter that looks similar to this:
CASE
WHEN `column` = 'MONDAY' THEN 1
WHEN `column` = 'TUESDAY' THEN 2
WHEN `column` = 'WEDNESDAY' THEN 3
WHEN `column` = 'THURSDAY' THEN 4
WHEN `column` = 'FRIDAY' THEN 5
WHEN `column` = 'SATURDAY' THEN 6
WHEN `column` = 'SUNDAY' THEN 7
END
Also note that you may need to use the TRIM() function in case there are any extra white spaces.
Thank you.I have created a sort and applied as shown, however it seems to have no affect, am I missing something? Below is my code/validated in beast mode.
(CASE
When 'Month' ='January - 2016' THEN 1
When 'Month' ='February - 2016' THEN 2
When 'Month' ='March - 2016' THEN 3
When 'Month' ='April - 2016' THEN 4
When 'Month' ='May - 2016' THEN 5
When 'Month' ='June - 2016' THEN 6
When 'Month' ='July - 2016' THEN 7
When 'Month' ='August - 2016' THEN 8
When 'Month' ='September - 2016' THEN 9
When 'Month' ='October - 2016' THEN 10
When 'Month' ='November - 2016' THEN 11
When 'Month' ='December - 2016' THEN 12
When 'Month' ='January - 2017' THEN 13
When 'Month' ='February - 2017' THEN 14
When 'Month' ='March - 2017' THEN 15
When 'Month' ='April - 2017' THEN 16
When 'Month' ='May - 2017' THEN 17
When 'Month' ='June - 2017' THEN 18
When 'Month' ='July - 2017' THEN 19
When 'Month' ='August - 2017' THEN 20
When 'Month' ='September - 2017' THEN 21
END)0 -
HA, after posting the question, I could see the nuance with my text nearby to compare - solved it. Needed to use ` and not ' for the column name. Now sorting as expected.
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.8K Visualize
- 2.5K Charting
- 738 Beast Mode
- 56 App Studio
- 40 Variables
- 684 Automate
- 176 Apps
- 452 APIs & Domo Developer
- 46 Workflows
- 10 DomoAI
- 35 Predict
- 14 Jupyter Workspaces
- 21 R & Python Tiles
- 394 Distribute
- 113 Domo Everywhere
- 275 Scheduled Reports
- 6 Software Integrations
- 123 Manage
- 120 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