Forum Discussion
DATE ADD Question/problem
- 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
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
- Anonymous6 years agoNot applicable
mahoneypat Putting the "dates" column there instead of "order dates" did indeed fix the issue! Thank you.
But one question: I thought that since my "order dates" column had a primary active relationship with my dates table, that the two essentially were interchangeable. I thought that was the point of making something an active relationship?