Time Series Comparison

Hey, I am new to Metabase and have been looking into the support articles. I want to do a time series comparison and have looked at this help article: https://www.metabase.com/learn/questions/time-series-comparisons to create a custom expression that will allow me to build a question that compares data over multiple years. When I follow the example, metabase says: Expecting expression but found function SumIf returning aggregation

The expression is as follows: SumIf([Amount], between([GiftDateUtc], "2021-01-01", "2021-12-31"))

Any troubleshooting ideas?

Thank you

Hi @aimfree
Are you sure you're using Custom Expression and not trying to create a Custom Column?
There's quick reference about expressions: https://www.metabase.com/docs/latest/users-guide/expressions.html

@flamber thank you so much! yes, I was putting the "expression" in a column section instead of the right spot. Thank you for pointing that out. I am definitely learning and missed that small detail!

I have the same problem but I use Custom expression in the filter ?

Anything wrong ?

Myversion v0.42.3

@thomas.pedot You are trying to aggregate on a filter. Either use the expression in the Summarize section, or just have the between expression in the Filter section.

I tried to find in the summarize section first but dind't find it ?

I want to reproduce the time series comparision so the filter will not work I guess.

@thomas.pedot Post "Diagnostic Info" from Admin > Troubleshooting.

{
  "browser-info": {
    "language": "en-US",
    "platform": "Win32",
    "userAgent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:99.0) Gecko/20100101 Firefox/99.0",
    "vendor": ""
  },
  "system-info": {
    "file.encoding": "UTF-8",
    "java.runtime.name": "OpenJDK Runtime Environment",
    "java.runtime.version": "11.0.14.1+1",
    "java.vendor": "Eclipse Adoptium",
    "java.vendor.url": "https://adoptium.net/",
    "java.version": "11.0.14.1",
    "java.vm.name": "OpenJDK 64-Bit Server VM",
    "java.vm.version": "11.0.14.1+1",
    "os.name": "Linux",
    "os.version": "4.15.0-166-generic",
    "user.language": "en",
    "user.timezone": "UTC"
  },
  "metabase-info": {
    "databases": [
      "mongo",
      "h2"
    ],
    "hosting-env": "unknown",
    "application-database": "postgres",
    "application-database-details": {
      "database": {
        "name": "PostgreSQL",
        "version": "11.13"
      },
      "jdbc-driver": {
        "name": "PostgreSQL JDBC Driver",
        "version": "42.2.23"
      }
    },
    "run-mode": "prod",
    "version": {
      "date": "2022-03-23",
      "tag": "v0.42.3",
      "branch": "release-x.42.x",
      "hash": "33fb268"
    },
    "settings": {
      "report-timezone": null
    }
  }
}

@thomas.pedot Not all functionality is supported on MongoDB:
https://github.com/metabase/metabase/issues/7097 - upvote by clicking :+1: on the first post

This explains why I saw it before ! I was using dremio plugin and it was working :slight_smile:

Thanks it saves me a lot of time.