Default Date Filter on an Embedded Dashboard
(NOT USING DATA RANGE)
I am wanting to filter data by Week ( 1, 2, 3, 4, 5, 6, etc..), but I am having trouble finding a solution that will allow me to 1. have a default filter that will open up the dashboard to the current week and then 2. being able to filter by other weeks.
Here's what I have tried:
- Using the Beast mode below I can get the highest week (or current week) but then I am not able to use the "Week" field to filter on. When I want the Week filter to show the options 18, 19, 20, 21, 22 (which it originally does) it will only show the option for week 22 when using this Beast mode.
CASE
WHEN `Year` = YEAR(CURRENT_DATE) AND `Week` = WEEK(CURRENT_DATE,0) THEN 'True'
ELSE 'False'
END
- Using a modified version of the beast mode above, I am able to get the highest week (current week) and also see and filter on other weeks (18, 19, 20, 21, 22). This is exactly what I wanted, but now that the next week has started, I noticed that the filter did not change from 21 to 22.
CASE
WHEN `Year` = YEAR(CURRENT_DATE) AND `Week` = WEEK(CURRENT_DATE,0) THEN CEILING(`Week`)
ELSE `Week`
END
If anyone has a solution that doesn't require using the Date Range filter, I'd love to hear from you.
Comments
-
To meet your first requirement, you can set a default filter for a page.
If you're doing it in ETL you might have a "isMostRecentWeek" binary column (a 0 or a 1) and then by default always filter to 1.
To accommodate your second requirement, we always recommend configuring a date dimension with a week column (i assume you mean week of year). You do have to be careful with beast modes because the start and end of the year can be tricky (when do you start counting the first week of the year? it differs by company).
Jae Wilson
Check out my 🎥 Domo Training YouTube Channel 👨💻
**Say "Thanks" by clicking the ❤️ in the post that helped you.
**Please mark the post that solves your problem by clicking on "Accept as Solution"2 -
Thanks for your reply.
Sorry for my poorly written post. To clarify, I have a week of year column in the dataset called 'week' (the 'week' column currently has weeks 19, 20, 21, and 22), and I want to be able to filter on those weeks along with having the current week (22) be the default page.
Now with this beast mode
CASE
WHEN `Year` = YEAR(CURRENT_DATE) AND `Week` = WEEK(CURRENT_DATE,0) THEN 'True'
ELSE 'False'
END
I set the default page to 'True' and that indeed gives me the current week (22), BUT now when I try to filter by week using the 'week' column, the only option to filter on is 22 ( 19, 20, 21 are gone).
I hope this makes more sense.
To reply to "If you're doing it in ETL you might have a "isMostRecentWeek" binary column (a 0 or a 1) and then by default always filter to 1.", Unless I'm mistaken, I think the beast mode I am using is doing pretty much the same thing as this.
0 -
@Airwon48, no your description made sense. you currently can't have a filter enabled (which excludes data) and then filter on excluded data.
That's why you'd use the default page filter, sorry forgot to link the KB, https://domohelp.domo.com/hc/en-us/articles/360042923914-Applying-Page-Level-Filters-with-Filter-Views
users would then have to deselect the default filter and then look for something else.
Jae Wilson
Check out my 🎥 Domo Training YouTube Channel 👨💻
**Say "Thanks" by clicking the ❤️ in the post that helped you.
**Please mark the post that solves your problem by clicking on "Accept as Solution"2 -
I see. I would like to use the default page filter (date range), but there are times when some weeks are long weeks (8-9 days) and overlap the following week, which is the main reason why we have a custom week column based off our company needs. Because of this - we can't use the default date range page filter.
I currently have the default page set up where it will give me the current week, but then the users have to do what you said, "deselect the default filter" and then filter on the other weeks they want to look at.
I was just hoping there was a way around not having to deselect the default page every time they want to filter on a different week.
From your experience, do you think if I made a binary column "isMostRecentWeek" in Magic ETL like you previously explained and then filtered on that for my default page -- would I be able to filter on the other weeks without having to deselect the default filter page? (if I just think about it-- i would say that it would still run into the same problem where I'd have to deselect that filter before filtering on other weeks, but if you have any other insights on that -- I'd love to hear them)
Thank you!
0
Categories
- All Categories
- 1.8K Product Ideas
- 1.8K Ideas Exchange
- 1.6K Connect
- 1.2K Connectors
- 300 Workbench
- 6 Cloud Amplifier
- 9 Federated
- 2.9K Transform
- 101 SQL DataFlows
- 622 Datasets
- 2.2K Magic ETL
- 3.9K Visualize
- 2.5K Charting
- 747 Beast Mode
- 59 App Studio
- 41 Variables
- 686 Automate
- 176 Apps
- 453 APIs & Domo Developer
- 47 Workflows
- 10 DomoAI
- 36 Predict
- 15 Jupyter Workspaces
- 21 R & Python Tiles
- 396 Distribute
- 113 Domo Everywhere
- 276 Scheduled Reports
- 7 Software Integrations
- 126 Manage
- 123 Governance & Security
- 8 Domo Community Gallery
- 38 Product Releases
- 10 Domo University
- 5.4K Community Forums
- 40 Getting Started
- 30 Community Member Introductions
- 109 Community Announcements
- 4.8K Archive