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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
dannyschool
Regular Visitor

How to count active customer numbers who has sales large than 4 units every month

Hi Folks,

Anyone know how to calculate active customer numbers. The active customer must to have at least 4 units sales every month.

dannyschool_0-1595783109013.png

 

Thank you.

3 REPLIES 3
harshnathani
Community Champion
Community Champion

Hi @dannyschool ,

 

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!

 

 

JustJan
Responsive Resident
Responsive Resident

Hi @dannyschool 

 

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")
 
Jan if this is a solution for you, don't forget to mark it as such. thanks

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors