Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more
How to display the list of products that made no revenue? (If product names and transaction details are maintained in a different table).
List of Products - sales products
List of transaction - sales transactions
Note: It makes no value to stock products that barely generates revenue. To find that we need to display the list of products that generates no revenue in a dashboard.
Sample Data:
List Of Products: (sales products)
| product_code | product_type |
| Prod001 | Own Brand |
| Prod002 | Own Brand |
| Prod003 | Own Brand |
| Prod004 | Own Brand |
| Prod005 | Own Brand |
List Of Sales Transactions: (sales transactions)
product_code | order_date | sales_amount |
| Prod001 | 09 October 2017 | 102 |
| Prod001 | 10 October 2017 | 102 |
| Prod002 | 09 January 2018 | 202 |
| Prod003 | 19 October 2016 | 203 |
| Prod003 | 09 October 2017 | 203 |
Expected Result:
Already I have the list of years and months and days. If I click "2017" in the years list and "October" in the months list,
| Unsold Products |
| Prod002 |
| Prod004 |
| Prod005 |
This is the required result.
Thanks to @Greg_Deckler ,for sending the link - the way to raise questions to get the answers quickly.
Solved! Go to Solution.
😊I have found the solution:
Create a new table in Power BI by going to 'Modeling' > 'New Table'.
In the formula bar, enter the following DAX formula to create a table with all the products that have not been sold on the selected date:
Unsold Products =
FILTER (
'sales products',
NOT (
CONTAINS (
'sales transactions',
'sales transactions'[product_code],
'sales products'[product_code]
)
)
)
This formula uses the FILTER function to filter the 'Products' table based on the condition that each product's Product ID does not appear in the 'Sales Transactions' table for the selected date. The CONTAINS function checks whether the 'Sales Transactions' table contains a record for each product on the selected date.
😊I have found the solution:
Create a new table in Power BI by going to 'Modeling' > 'New Table'.
In the formula bar, enter the following DAX formula to create a table with all the products that have not been sold on the selected date:
Unsold Products =
FILTER (
'sales products',
NOT (
CONTAINS (
'sales transactions',
'sales transactions'[product_code],
'sales products'[product_code]
)
)
)
This formula uses the FILTER function to filter the 'Products' table based on the condition that each product's Product ID does not appear in the 'Sales Transactions' table for the selected date. The CONTAINS function checks whether the 'Sales Transactions' table contains a record for each product on the selected date.
@Rajesh_Kumar_11 Sorry, having trouble following, can you post sample data as text and expected output?
Not really enough information to go on, please first check if your issue is a common issue listed here: https://community.powerbi.com/t5/Community-Blog/Before-You-Post-Read-This/ba-p/1116882
Also, please see this post regarding How to Get Your Question Answered Quickly: https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490
The most important parts are:
1. Sample data as text, use the table tool in the editing bar
2. Expected output from sample data
3. Explanation in words of how to get from 1. to 2.
Thank you @Greg_Deckler for your response and thanks for sharing links it helped me a lot to understand about the conventions followed in this community. I'm new to this community and I will quickly adapt to this community's environment😊
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.