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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
MotionManJim
Regular Visitor

How to find customers that have not purchased a filtered list of items

Hello All. I have single table driving my Power BI sales report. I have an area where a user enters a filter criteria that returns all of the customers that purchased an item that contains the search criteria. For example, I may have a series of products that begin with ABC. Finding customers that purchased those items is no problem. However, I would also like to find a list of customers that have never purchased ABC products. Just changing the filter to Does Not Contain does not work, as almost all customers have purchased some other item. My filter criteria needs to be user entered and not constrained to a single item number.

 

Any ideas? I was able to do this in Excel with some clunky hidden Pivot Tables, but I have not found a way yet in Power BI. Thanks.

1 ACCEPTED SOLUTION

I added a second table for the items and used the following measure to determine if a customer had order history for my filtered items:

 

IfHaveOrders =
IF ( SUM ( 'TableName'[Price] ) > 0, 1, 0 )
 

View solution in original post

6 REPLIES 6
MotionManJim
Regular Visitor

Here is a snip from my report with sensitive data hidden. This visual works. Users enter search criteria and the visuals show all customers that have purchased anything that match the criteria. What I want to add is another visual that shows all customers that have never purchased the items in the search criteria. Essentially the master table minus the customers listed in this visual.PBI.JPG

I added a second table for the items and used the following measure to determine if a customer had order history for my filtered items:

 

IfHaveOrders =
IF ( SUM ( 'TableName'[Price] ) > 0, 1, 0 )
 
Ashish_Mathur
Super User
Super User

Hi,

Share some data and show the expected result.


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

Updated above.

bcdobbs
Super User
Super User

Can you provide a demo pbix file.

 

Struggling to picture which customers you want to show given you state that almost all have purchased other products.



Ben Dobbs

LinkedIn | Twitter | Blog

Did I answer your question? Mark my post as a solution! This will help others on the forum!
Appreciate your Kudos!!

Updated above.

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.