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

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.

Reply
Syndicate_Admin
Administrator
Administrator

Calculate number of frequent customers

Hello community.

My doubt is as follows:

I have to count the number of frequent customers.

A frequent customer is one who has made 3 or more visits (transactions) in the month consulted.

I already have the measure that counts the transactions that the client has made, it is as follows:

eduardoqsr_0-1622061578206.png

Based on this measure I create another one that makes me the same calculation, but with date filter context, shown in the following image:

eduardoqsr_1-1622061667528.png

If I add a condition where I put 1 to customers who had more than 2 visits, the code would look like this:

eduardoqsr_3-1622061949755.png

And the result would look like the following table shown:

eduardoqsr_4-1622062102071.png

On the Frequently Customers card should be 5, because of the total customers, only 5 had more than 2 visits.

The problem is that in the result of the measure it does not add it up, it just labels it.

Would you really appreciate it if any of you had any recommendations about it?

1 ACCEPTED SOLUTION

Hi @Syndicate_Admin ,

 

Try the following formula:

 

Measure = 
IF(
    ISFILTERED(TransactionsPerDay[IdCustomer]),
    [Frequently Customers],
    SUMX(ALLSELECTED(TransactionsPerDay[IdCustomer]), [Frequently Customers])
)

 

If the problem is still not resolved, please provide detailed error information or the expected result you expect. Let me know immediately, looking forward to your reply.

Best Regards,
Winniz

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

3 REPLIES 3
Ashish_Mathur
Super User
Super User

Hi,

Share the link from where i can download your PBI file.  Please ensure that you share only relevant tables/tabs in that file and all information in that file is in English.

Thank you.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

I really appreciate your comment.

I have an inconvenience, the tables are from Power Query, they have 25,000,000 approx...

These are the tables that are relevant to this case...

eduardoqsr_0-1622073975526.png

Hi @Syndicate_Admin ,

 

Try the following formula:

 

Measure = 
IF(
    ISFILTERED(TransactionsPerDay[IdCustomer]),
    [Frequently Customers],
    SUMX(ALLSELECTED(TransactionsPerDay[IdCustomer]), [Frequently Customers])
)

 

If the problem is still not resolved, please provide detailed error information or the expected result you expect. Let me know immediately, looking forward to your reply.

Best Regards,
Winniz

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

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