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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
LamSar
Helper III
Helper III

Add products a customer did not buy to list of all the products where there are sales

Good afternoon,


A report users asked if it would be possible to also add the product a customer did not buy in the list (per year and month and client).
The model is as follows:

Model.PNG
The report is like this:

Visual.PNG
 At the moment only the articles that a customer has bought are in the list, but now they also want to see, the articles a customer did not buy (with sales amount zero off course). Any ideas on how I could do this?

 

Thanks.

1 ACCEPTED SOLUTION
v-jingzhang
Community Support
Community Support

Hi @LamSar 

 

You may consider using the EXCEPT function. EXCEPT function (DAX) - DAX | Microsoft Docs

EXCEPT(<table_expression1>, <table_expression2>

 

Get the full list of products as expression1 and the list of products bought as expression2. Then you can get a list of products that only exist in the expression1, which are those not bought by customers. 

 

Best Regards,
Community Support Team _ Jing
If this post helps, please Accept it as Solution to help other members find it.

View solution in original post

3 REPLIES 3
v-jingzhang
Community Support
Community Support

Hi @LamSar 

 

You may consider using the EXCEPT function. EXCEPT function (DAX) - DAX | Microsoft Docs

EXCEPT(<table_expression1>, <table_expression2>

 

Get the full list of products as expression1 and the list of products bought as expression2. Then you can get a list of products that only exist in the expression1, which are those not bought by customers. 

 

Best Regards,
Community Support Team _ Jing
If this post helps, please Accept it as Solution to help other members find it.

amitchandak
Super User
Super User

@LamSar , Put product and customer into a visual and assume you measure [purchase]

 

try a measure like

if(isblank([purchase]), 1,blank())

 

or

 

countx(addcolumns(summarize(Purchase, customer[Customer], product[product]) , "_1", if(isblank([purchase]), [Customer],blank()) ) ,[_1])

Unfortunately this will not work for me. 

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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