Forum Discussion
DistinctCount help with DATEADD only works with contigous date selections
- 9 years ago
I started cutting it down and editing it for privacy. As I removed a table, completely unrelated to anything I am doing here, suddenly it started working. I am not sure how the relationship was interfering with this,but after changing the relationship, (Both to Single) completely unrelated to this, it worked, Now I have to make sure that nothing else broke with this relationship change, but I got the problem figured out.
Thanx everyone.
Phil
Another attempt to fix it created another issue I do not understand.
LastDate = LOOKUPVALUE('Date'[Date], 'Date'[Date], CALCULATE(MAX('Sales'[invoice_date]), ALL('Sales')))
StartDatePY = YEAR(DATEADD([LastDate], -1, YEAR))
This measure fails with an error I do not understand:
CALCULATE' has been used in a True/False expression that is used as a table filter expression. This is not allowed.
Where is the True/False expression?
Phil