Getting a message something's gone wrong while trying to create a trend visual

Wrote a Custom Expression to fetch revenue
SumIf([Amount], [Category] = "Total Income")

Grouped this by PnL Date by month

when I click Visualize, it generates a line chart.
When I select the trend option on this, I get "Something's gone wrong"

Not sure how to fix this.

Metabase version: 0.49.7 self hosted

Could you share a screenshot of the editor or the SQL query?