Cathy Liu
05/27/2026, 3:16 AMkapa.ai
05/27/2026, 3:16 AMFOR Previous uses {attribute/...} references, not {label/...}. The documented syntax is:
SELECT {metric/revenues} FOR Previous({attribute/quarter})
So for your case, the correct form would likely be:
SELECT {metric/your_metric} FOR Previous({attribute/BUS_DATE.year})
Using {label/BUS_DATE.year} may work depending on your data model setup, but the standard documented syntax references the attribute, not the label. [FOR Previous]
A few additional things to keep in mind:
⢠PREVIOUS({label/BUS_DATE.year}) is equivalent to FOR Previous({attribute/...}, 1) ā it shifts back by one year. [Time Macros]
⢠If your visualization uses multiple date objects, FOR PREVIOUS will only shift the specific date attribute you specify ā it cannot dynamically shift all date filters applied to the metric. [Community Slack]
If you're seeing unexpected results, double-check whether you should be using {attribute/BUS_DATE.year} instead of {label/BUS_DATE.year}, and confirm that the date dimension identifier matches your data model. š 0 button š 0 button ā¹ļø Tip: Mention @kapa.ai in the thread for follow-ups.
š Our Support team monitors all messages and will jump in if needed.