Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
EVEAdmin
Post Patron
Post Patron

Select customers where membership expired in the last 90 days

Hi all,

 

on a table, I have a column for the Customer ID and a Column for the licence expiry date.

What I would like to do is extract the list of CustomersID where the membershop expired during the past 90 days.


I created a first quick measure which will select the max date for each customer:

LatestExpiry = 
MAXX(
	KEEPFILTERS(VALUES('Items'[InCustID])),
	CALCULATE(MAX('Items'[ExpiryDate]))
)

Then, I created a second measure that should return only those records where the max expiry date is in the past 90 days

ExpiredLast90Days = IF(TODAY()>[LatestExpiry] && DATEDIFF(TODAY(),[LatestExpiry],day)<=90,1,0)

but it does not work as intended. Any help, please?

 

1 ACCEPTED SOLUTION
EVEAdmin
Post Patron
Post Patron

I changed the second measure as follows and now it works

ExpiredLast90Days = IF(TODAY()>[LatestExpiry] && [LatestExpiry]>= TODAY()-90 ,1,0) 

View solution in original post

2 REPLIES 2
EVEAdmin
Post Patron
Post Patron

I changed the second measure as follows and now it works

ExpiredLast90Days = IF(TODAY()>[LatestExpiry] && [LatestExpiry]>= TODAY()-90 ,1,0) 
Anonymous
Not applicable

Is there a way to show Customer IDs where the expired date is NOT in the last 30,60, 90 days etc.?

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.