I am a new Metabase user who has tried a number of searches to figure this out, but ultimately seems like they've been all outdated.
So I want to create a dashboard where I can flip from "last 7 days" to "last 30 days" and have my trend update to the amount of orders that came in between the last 7 days, and the trend percent to be based upon the last 7 days of those 7 days. I figured out how to make like generic trends, weekly, daily trends but its missing two things
- The ability to group the date time by the X days within the trend specifically, I don't want "by week" "by day" i want the last 7 days.
- The date-time filter feature on the dashboard seems to have no effect on trends.
- Is there an ability to select the amount of days the trends groups by via the dashboard, or do I have to create a new card for every trend. (Last 7 days, Last 30 days, Q1, etc)
Has anyone already figured this out for their dashboards?
Hi @business_per_usual
Currently you would have to do some hacking with Native/SQL to change the grouping either depending on period span or with a text variable filter, or like you suggest, use multiple questions.
There’s a request for this feature:
https://github.com/metabase/metabase/issues/5346 - upvote by clicking
on the first post
You might also be interested in this issue:
https://github.com/metabase/metabase/issues/8977
Hey Flamber, that is what I tried but ultimately couldn’t figure out. Do you have any examples of how to achieve this? I did google search things like"MySQL month to month growth" etc etc and tried to use their examples but couldn’t get it to work unfortunately.
Would love to pay $15 a month or whatever for metabase to increase their development speed. Really love the project, just seems slow in terms of improvement which is understandable due to it being free.
@business_per_usual
So how did you create the current questions? If they’re created via the interface, then simply convert it to SQL:
https://www.metabase.com/docs/latest/users-guide/custom-questions.html#viewing-the-sql-that-powers-your-question
And then you would add two filters to that. One Field Filter for the date period, and one Text filter for the grouping:
https://www.metabase.com/docs/latest/users-guide/08-dashboard-filters.html
Metabase is a massive project, but it is open source, so you could find developers and have them submit PRs.