cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
New Member

Count of Customers with no Sales

Hello Experts,

 

I need to create a card that show the Count of Customers with no Sales filtered by date and brand. I tried the following measure

 

No of Customers with no Sales =
CALCULATE(
COUNT(Customer[Customerid]),
FILTER(salesinvoices,[Count of Sales invoice]=0)
)
 
But it always show blank.
 
Thanks all in advance~
 
This is my sample data.
Sales Invoice
Customer IDTotal AmountDateSales Invoice ID
A10043101ID1
B20043133ID2
30043134ID3
D40043194ID4
    

 

 Invoice Line
Invoice Line IDSales Invoice IDBrand 
LINE1ID1Brand A
LINE2ID2Brand B
LINE3ID3Brand A
LINE4ID4Brand B
LINE5ID1Brand A
LINE6ID2Brand B
LINE7ID3Brand A
LINE8ID4Brand B

 

Customer
Customer ID
A
B
D
E
1 ACCEPTED SOLUTION

Hi @Geniebelle123

 

You may create the measures as below and change the relationships. Attached the sample file.

Measure =
IF (
    NOT ( MAX ( Customer[Customer ID] ) ) IN VALUES ( 'Sales invoice'[Customer ID] ),
    1
)
Customers with no sales = SUMX(Customer,[Measure])

Regards,

Cherie

Community Support Team _ Cherie Chen
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

6 REPLIES 6
Super User III
Super User III

Hi,

 

Based on the data you have shared, please let us know the exact result you are expecting and rationale for the same.


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

@Ashish_Mathur

 

This is my expected result!

expected result.PNG

 

 

Thanks

Hi @Geniebelle123

 

You may create the measures as below and change the relationships. Attached the sample file.

Measure =
IF (
    NOT ( MAX ( Customer[Customer ID] ) ) IN VALUES ( 'Sales invoice'[Customer ID] ),
    1
)
Customers with no sales = SUMX(Customer,[Measure])

Regards,

Cherie

Community Support Team _ Cherie Chen
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

Hi, this works when comparing all customers in the customers table however I need to filter out the customers table to consider only the customers who have bought in the last one year. How can I go around this?

Microsoft
Microsoft

Hi @Geniebelle123

 

Could you show us the measure [Count of Sales invoice] you created? Please show the relationships. If you could share the .pbix file, we could provide an accurate solution. You can upload it to OneDrive and post the link here. Do mask sensitive data before uploading.

 

Regards,

Cherie

Community Support Team _ Cherie Chen
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
secondImage

Congratulations!

We are excited to announce the Power BI Super Users!

Microsoft Ignite

Microsoft Ignite with Arun Ulag

Featured Session: Drive Data Culture with Power BI- Vision, Strategy & Roadmap. Register here https://myignite.microsoft.com #MSIgnite #PowerPlatform #Power BI ​

Microsoft Ignite

Microsoft Ignite

Join digitally, March 2–4, 2021 to explore new tech that's ready to implement. Experience the keynote in mixed reality through AltspaceVR!

secondImage

The largest Power BI virtual conference

100+ sessions, 100+ speakers, Product managers, MVPs, and experts. All about Power BI. Attend online or watch the recordings.

Top Solution Authors
Top Kudoed Authors
Users online (1,347)