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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Reply
miramontesmj
New Member

Viewing only "new" inventory

I have a dataset that holds exports of inventory counts grouped by month. An example would be if I had 10 apples with barcode 44444 at the end of January and a didn't sell any, then I would have 10 apples with that same barcode 44444 at the end of February. This would show up one right after another when sorting by apples and then by month.

 

 


The question I have: If when March's report came out it and I had 7 new apples with a new barcode 55555 along with the orignial 10 apples totaling 17 apples. Since I already knew I had 10 apples with the 44444 I dont want to see them, I would only want to see the new apples.

Mainly what I am asking for is a way to see only "new" inventory that has shown up for that month. My idea is to sort by unique barcodes as filter for that specific month.

2 REPLIES 2
123abc
Community Champion
Community Champion

In Power BI, you can achieve the goal of viewing only "new" inventory that has shown up for a specific month by using a combination of calculated columns and filters. Here are the steps to do this:

  1. Create a Calculated Column for Monthly Totals: Start by creating a calculated column that calculates the total inventory count for each product (barcode) for each month. You can use the SUMX and FILTER functions to achieve this. Let's assume your table is called "Inventory" and it has columns like "Barcode," "Month," and "Count." Here's an example of how to create the calculated column:

MonthlyTotalCount = SUMX( FILTER( Inventory, Inventory[Month] = EARLIER(Inventory[Month]) && Inventory[Barcode] = EARLIER(Inventory[Barcode]) ), Inventory[Count] )

 

  1. This calculated column will give you the total count of each product for each month.

  2. Create a Filter for New Inventory: Now, you can create a filter in your visualizations to show only the rows where the "MonthlyTotalCount" is equal to the "Count" for that specific month. This will filter out the rows for products that already existed in previous months. In your visual, you can use a slicer or a filter visual to allow users to select a specific month.

    For example, you can use a table or matrix visual, and then set the filter condition as follows:

    • Field: Month
    • Operator: is
    • Value: [Select the desired month from the slicer or filter visual]

    This will show only the "new" inventory items for the selected month.

Now, when you select a specific month in your slicer or filter visual, it will display only the products that are considered "new" for that month based on your criteria. The calculated column "MonthlyTotalCount" ensures that you're comparing the count for each product only within the same month, filtering out products that were already present in previous months.

Helpful resources

Announcements
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

AugPowerBI_Carousel

Power BI Monthly Update - August 2024

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

August Carousel

Fabric Community Update - August 2024

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