Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more
Trying to work out number of active customers checking if their lapsed date has been reached. Lapsed date is when there is no order for customer in last 12 months
# Active Cust =
VAR dt =
CALCULATE (
MAX ( 'Calendar'[Date] ),
ALLSELECTED ( 'Calendar'[Date] )
)
VAR ActiveCustomers =
ADDCOLUMNS (
VALUES ( Sales[Sell-to Customer No_] )
,"@LapsedDate", [CustomerLapsedDate] ) -- measure lasped date , last order date + 12 months
var __activeCusts =
COUNTROWS (
DISTINCT (
FILTER ( ActiveCustomers, [@LapsedDate] > dt)
)
)
return __activeCusts
Desired Result with correct active customers, the total is actually correct as it stand 33 customers have not lasped. However I want this view at month level. So June should show 33
Solved! Go to Solution.
Solved it in the end, was simply this!
# Active Customers =
VAR EndDate = MAX('Calendar'[Date])
VAR StartDate =EDATE(EndDate,-12)
VAR Result =
CALCULATE(
[# Customers],DATESBETWEEN(Calendar[date],StartDate,EndDate)
)
RETURN
IF (Result = BLANK(), 0, Result)
Solved it in the end, was simply this!
# Active Customers =
VAR EndDate = MAX('Calendar'[Date])
VAR StartDate =EDATE(EndDate,-12)
VAR Result =
CALCULATE(
[# Customers],DATESBETWEEN(Calendar[date],StartDate,EndDate)
)
RETURN
IF (Result = BLANK(), 0, Result)
Can i include anything extra to help arrive at a solution, new to psoting on the forum thanks?
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.
| User | Count |
|---|---|
| 9 | |
| 5 | |
| 4 | |
| 3 | |
| 3 |
| User | Count |
|---|---|
| 24 | |
| 12 | |
| 11 | |
| 9 | |
| 8 |