1 of 1 people found this helpful
Use sub query SELECT MAX(Date) from ABC instead variable.
Select * from abc from
WHERE xyz.Date > DATEADD(dd, -30, SELECT MAX(Date) from ABC)
GROUP BY xyz.Date
) as tmp
Thanks for the prompt reply. Yes, but can't we declare and call that variables.
I'm not sure about that. I believe it doesn't work. Databases are called to process queries. I think Tableau tries to process it for itself and doesn't understand the language.
For sure you don't need to do it.
Run a test grouping for a field table. Your group by was using variable.