Forum Discussion

powerbiexpert22's avatar
powerbiexpert22
Impactful Individual
2 years ago
Solved

customers count

customers count are not showing correctly, please find below pbx file 

pbix file : https://drive.google.com/file/d/1LeyNvAuC-Od6vTplCsG1MYCVwdkkhtJ5/view?usp=drive_link

 

 

 

 

 

  • Hi powerbiexpert22 

    You were unable to calculate the number of customers because there is no connection between customers and dates.

    If the intention was to calculate the number of customers who made purchases in different countries by year, then the required formula is:

    RepeatCustomers =
    DISTINCT COUNT('Internet Sales'[Customer Key])

    The updated pbix is attached

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

     

3 Replies

  • Hi powerbiexpert22 

    You were unable to calculate the number of customers because there is no connection between customers and dates.

    If the intention was to calculate the number of customers who made purchases in different countries by year, then the required formula is:

    RepeatCustomers =
    DISTINCT COUNT('Internet Sales'[Customer Key])

    The updated pbix is attached

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

     

  • powerbiexpert22's avatar
    powerbiexpert22
    Impactful Individual

    Hi Ritaf1983 

    thanks, let say there would be some scenario (i am unable to think) where i would need to show data based on only date and customer columns then how can i acheive in this data model?

    • Ritaf1983's avatar
      Ritaf1983
      Super User

      Hi powerbiexpert22 

      There's no such thing as a "some scenario" in analytics. There are specific questions with specific answers based on the data.

      In the current model, the only relationship between the calendar and customers is through sales. In other words, if there are no sales in period XYZ, there are also no customers (based on the calendar table).

      I noticed you have a "First Purchase Date" column in the customer table along with their "Date of Birth". Based on these columns, you can create additional logic by connecting to a calendar table.

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