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

Get inspired! Check out the entries from the Power BI DataViz World Championships preliminary rounds and give kudos to your favorites. View the vizzies.

Reply
powerbiexpert22
Post Prodigy
Post Prodigy

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

 

powerbiexpert22_0-1720366822349.png

 

 

powerbiexpert22_1-1720366903963.png

 

 

1 ACCEPTED SOLUTION
Ritaf1983
Super User
Super User

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])
Ritaf1983_0-1720367829959.png

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.

 

Regards,
Rita Fainshtein | Microsoft MVP
https://www.linkedin.com/in/rita-fainshtein/
Blog : https://www.madeiradata.com/profile/ritaf/profile

View solution in original post

3 REPLIES 3
powerbiexpert22
Post Prodigy
Post Prodigy

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?

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.

 

Regards,
Rita Fainshtein | Microsoft MVP
https://www.linkedin.com/in/rita-fainshtein/
Blog : https://www.madeiradata.com/profile/ritaf/profile
Ritaf1983
Super User
Super User

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])
Ritaf1983_0-1720367829959.png

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.

 

Regards,
Rita Fainshtein | Microsoft MVP
https://www.linkedin.com/in/rita-fainshtein/
Blog : https://www.madeiradata.com/profile/ritaf/profile

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

FebPBI_Carousel

Power BI Monthly Update - February 2025

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

Feb2025 NL Carousel

Fabric Community Update - February 2025

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

Top Solution Authors
Top Kudoed Authors