The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
Hi Folks,
Anyone know how to calculate active customer numbers. The active customer must to have at least 4 units sales every month.
Thank you.
Hi @Anonymous ,
You can check if this works
Quantity 1M =
CALCULATE (
SUM ( 'Table'[Purchase Quantity] ),
DATESINPERIOD (
'Calendar'[Date],
MAX ( 'Calendar'[Date] ),
-1,
MONTH
)
)
Active Customers =
VAR _activeCusts =
FILTER (
Customers,
[Quantity 1M] > 4
)
RETURN
COUNTROWS ( _activeCusts )
Regards,
Harsh Nathani
Appreciate with a Kudos!! (Click the Thumbs Up Button)
Did I answer your question? Mark my post as a solution!
Hi @Anonymous
It could something like this:
MoreThan4 =
var _NofMonths = DISTINCTCOUNT(Data[Month])
var _4Units = calculate( DISTINCTCOUNT(Data[Month]), Data[Qty] >=4)
return If (_4Units>=_NofMonths, "Active", "Not Active")