Filter results in the last year, month, week, or day

Please help! This is driving me insane.

I have a data type called “customer”.

Each “customer” has a field called “revenue”

I am displaying a dashboard where I am showing all of the “revenue” of all of my “customers”.

I want to create a filter that will only display “revenue” of all my “customers” in the last year, month, week, or day.

HOW DO I DO THIS?!

**Customer should be separate from Revenue
**Revenue is added based on invoices and other income (Which would be the separate Data Type)
**Create a Data Type called Revenue and add field in Customer as List of Revenues
**The Revenue data type should have the different income amounts, dates, and other information

Dashboard

  1. Create 2 Date/Time Picker input fields (one for start, the other for end)
  2. Create a Group and add a Repeating Group inside

    Repeating Group Settings
  3. The repeating group content will have the Revenue
  4. Data Source: Search for Revenue: See below on constraints
    image
  5. Then add :filtered to the end of the Search for Revenue string
    image
  6. You will be able to filter the Invoice Dates using those inputs

I have a link below for a demo and also the backend

Website: https://fun-sandbox.bubbleapps.io/

Backend: https://bubble.io/page?type=page&name=index&id=fun-sandbox&tab=tabs-1

*Still correct the main 3 tabs though

2 Likes

Please take a look at the backend to understand the first part