Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
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?
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
| User | Count |
|---|---|
| 11 | |
| 9 | |
| 9 | |
| 6 | |
| 6 |
| User | Count |
|---|---|
| 26 | |
| 22 | |
| 19 | |
| 17 | |
| 11 |