Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago
Solved

DATE ADD Question/problem

Hello Community  -  I have a date table.      I have the following measure that sums up the value of orders received (as of yesterday's date).    It works in the sense that is giving me the correct s...
  • mahoneypat's avatar
    6 years ago

    It looks like you are using the Order Date column from your fact table i.e., not your Date table.  When you add -1 day to the Date table with DATEADD() you are then returning a result for the day of the previous year (even though the Date table is filtered to the current year).  If you use your 'Date Table'[Date] column in your visual you should take care of the issue.

     

    If you need to keep the order date column in there for some reason, you can add another term to your CALCULATE, so that it is filtered down to the current year.

     

    If this works for you, please mark it as the solution.  Kudos are appreciated too.  Please let me know if not.

    Regards,

    Pat