Forum Discussion
Anonymous
3 years agoNot applicable
Showing latest date before specific date
Hi all I am trying only to show the client's latest ticket date if it's older than two weeks using DAX. For example, today is the 21st and 2 weeks ago it was the 7th, I only want to show the ...
- 3 years ago
Thank you for sample data. Here is the code:
Customers with last ticket older than 2 weeks ago = var customer_last_ticket = MAXX( DISTINCT('Sample'[client_id]); MAX('Sample'[created_at]) ) return IF(DATEDIFF(customer_last_ticket;TODAY();DAY)>=14;customer_last_ticket)In the variable customer_last_ticket we are storing an information about last ticket per customer
Then if this ticket is older than 14 days ago we are displaying int 🙂
I hope that this is what you've wanted.
Anonymous
3 years agoNot applicable
Sorry, it's just another client number so the data would be roughly the same as the test data supplied.
Tried to attach a test file but cannot link any more.
Are you developing this as a measure or column?
bolfri
Solution Sage
3 years agoThis code that I've send you is a measure.