Starting Day of the Week - Monday
Hello, can anyone help me find a solution on how I could start with Monday for the weekly data? My data is dynamic, so it has to update on a weekly basis - I used Last 4 weeks.
I have a table with weekly data showing like the one below,
and when I created a bar chart in DOMO, originally, when graphed weekly, it will start with Sunday data.
Thank you and hope someone could help me :)
Best Answers
-
If this is going to be a consistent, recurring use-case. I.e. you’re going to want other cards to replicate the same behavior. I’d recommend using the fiscal calendar option in Domo. When setting it up you’ll be able to specify your week start date.
You can then either toggle that setting on/off to use your Monday start date or the default.
Link to article about fiscal calendar.
David Cunningham
** Was this post helpful? Click Agree 😀, Like 👍️, or Awesome ❤️ below **
** Did this solve your problem? Accept it as a solution! ✔️**2 -
@Zel I second @david_cunningham's recommendation about a fiscal calendar. If this is only a requirement for this card, then I suggest creating a beast mode to transform your date field to the most recent Monday to use for your series like this:
case when DAYNAME = 'Sunday' then DATE_SUB(`Date`,interval 6 day) else `Date` - DAYOFWEEK(`Date`) + 2 end
1 -
Hi @Zel ,
I hope I can help. Here is where I have some SQL formulas to help:
If you look at "Round dates to previous monday" you can see this formula:
Date-weekday(Date -1)+1 (if doing in a beast mode). Let me know if that helps
John Le
You're only one dashboard away.
Click here for more video solutions:
0
Answers
-
If this is going to be a consistent, recurring use-case. I.e. you’re going to want other cards to replicate the same behavior. I’d recommend using the fiscal calendar option in Domo. When setting it up you’ll be able to specify your week start date.
You can then either toggle that setting on/off to use your Monday start date or the default.
Link to article about fiscal calendar.
David Cunningham
** Was this post helpful? Click Agree 😀, Like 👍️, or Awesome ❤️ below **
** Did this solve your problem? Accept it as a solution! ✔️**2 -
@Zel I second @david_cunningham's recommendation about a fiscal calendar. If this is only a requirement for this card, then I suggest creating a beast mode to transform your date field to the most recent Monday to use for your series like this:
case when DAYNAME = 'Sunday' then DATE_SUB(`Date`,interval 6 day) else `Date` - DAYOFWEEK(`Date`) + 2 end
1 -
Hi, @david_cunningham and @MichelleH , thank you for looking into this. I will be using it for 2 cards.
I tried the beast mode you sent, but getting an error. 🙁
0 -
@MichelleH thank you for the quick response. I tried using the beast mode but still getting the same dates at the bottom.
0 -
I see. Thank you for letting me know. Is there a workaround for this view? Just like what we have in the previous snapshots.
0 -
@MichelleH I see. Thank you for letting me know. Is there a workaround for this view? Just like what we have in the previous snapshots.
0 -
@Zel If you don't want the date gaps, you can convert the dates to a string using the DATE_FORMAT function:
DATE_FORMAT(case when DAYNAME(`Date`) = 'Sunday' then DATE_SUB(`Date`,interval 6 day) else `Date` - DAYOFWEEK(`Date`) + 2 end, '%Y-%m-%d' )
Note that if you do this, you will need two versions of this beast mode: one in a string format for the X-axis values, and one in date format for the date filters.
0 -
@MichelleH I tried doing that and I'm getting the result below. Apologies for the questions. Please bear with me 😅 I really appreciate your efforts.
and these are 2 beast modes: string format and date format
0 -
Hi @Zel ,
I hope I can help. Here is where I have some SQL formulas to help:
If you look at "Round dates to previous monday" you can see this formula:
Date-weekday(Date -1)+1 (if doing in a beast mode). Let me know if that helps
John Le
You're only one dashboard away.
Click here for more video solutions:
0 -
thank you all for your help 😊
0
Categories
- All Categories
- 1.8K Product Ideas
- 1.8K Ideas Exchange
- 1.5K Connect
- 1.2K Connectors
- 296 Workbench
- 6 Cloud Amplifier
- 8 Federated
- 2.9K Transform
- 100 SQL DataFlows
- 614 Datasets
- 2.2K Magic ETL
- 3.8K Visualize
- 2.5K Charting
- 729 Beast Mode
- 53 App Studio
- 40 Variables
- 677 Automate
- 173 Apps
- 451 APIs & Domo Developer
- 45 Workflows
- 8 DomoAI
- 34 Predict
- 14 Jupyter Workspaces
- 20 R & Python Tiles
- 394 Distribute
- 113 Domo Everywhere
- 275 Scheduled Reports
- 6 Software Integrations
- 121 Manage
- 118 Governance & Security
- Domo Community Gallery
- 32 Product Releases
- 10 Domo University
- 5.4K Community Forums
- 40 Getting Started
- 30 Community Member Introductions
- 108 Community Announcements
- 4.8K Archive