cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Frequent Visitor

Calculate customers visits frequency

Hi there,

 

I'm new to the forum and DAX and I need some help.

Generally, the problem is that I have a table with 2 fields, Dates and Customers. What do I want to get is a chart showing how many customers are visited 1 time, how many 2 times and etc. Link to the data is here: CustomersVisitsData

CustomersVisits.png

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Thank you in advance.

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Super User III
Super User III

Re: Calculate customers visits frequency

@BorisV

 

File attached here

 

countofvisits.png

Try my new Power BI game Cross the River

View solution in original post

3 REPLIES 3
Highlighted
Super User III
Super User III

Re: Calculate customers visits frequency

@BorisV

 

If you already have a Count of Visits Column in your Raw Data

 

you can simply put it in the X - Axis and put the count of count of Visits as Values

 

Please see the attached file

 

If you dont have this column, you can use this calculated column

 

Count of Visits =
IF (
    [DATE_OF_VISIT]
        = MINX (
            FILTER ( Table1, [Customer Name] = EARLIER ( [Customer Name] ) ),
            [DATE_OF_VISIT]
        ),
    CALCULATE (
        COUNT ( Table1[DATE_OF_VISIT] ),
        ALLEXCEPT ( Table1, Table1[Customer Name] )
    )
)

 

Try my new Power BI game Cross the River
Highlighted
Super User III
Super User III

Re: Calculate customers visits frequency

@BorisV

 

File attached here

 

countofvisits.png

Try my new Power BI game Cross the River

View solution in original post

Highlighted
Frequent Visitor

Re: Calculate customers visits frequency

Thank you. That's great. Really appreciate you help. Smiley Happy

Helpful resources

Announcements

August Community Highlights

Check out a full recap of the month!

August 2020 CYST Challenge

Check out the winners of the recent 'Can You Solve These?' community challenge!

Experience what’s next for Power BI

Join us for an in-depth look at the new Power BI features and capabilities at the free Microsoft Business Applications Launch Event.

Top Kudoed Authors