2 Replies Latest reply: May 16, 2018 12:32 PM by Kaushik Solanki RSS

    master calendar doesn't work

    Wanyun Yang

      Hi guys,

       

      I have a master_calendar table with Year, Month, Date, and LINK_DATE (Date in master_calendar table) which links to sales table by LINK_DATE (sales_date in sales table). Now I'm trying to calculate Previous Year's sales amount. My function is:

      Sum({<Date={">=$(=addyears(Min(Date),-1))<=$(=addyears(Max(Date),-1))"}>}[SalesAmount])


      I have filters: Year, Month, Date, Date as Date Range Picker. When I filter with month or date or date range picker, it works. But when I filter with year, it only shows me 0.

       

      I'm wondering what's wrong. Any advice helps. Thanks in advance!