Forum Discussion
Anonymous
6 years agoNot applicable
Query - Find max date for each customer, if null take last previous transaction date, by month year
Hi, I have a table with transaction dates for each customer. Then I have date table with dates, months, years. I want to have a new table that will show for each customer his last transactio...
- 6 years ago
Hi Anonymous
I've had a similar situation, the below helped me solve it. I think the blank date would get resolved by this also.
Anonymous
6 years agoNot applicable
Hi Anonymous ,
Check the measure below.
Measure = CALCULATE(MAX('Table'[date]),FILTER(ALLEXCEPT('Table','Table'[customer]),MONTH('Table'[date])<=SELECTEDVALUE('CALENDAR'[month])&&YEAR('Table'[date])=SELECTEDVALUE('CALENDAR'[year])))
Best Regards,
Jay