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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
Anonymous
Not applicable

Identify and count new Products

Hi all, 

 

I work for a distribution company where we import products from a number of different brands. We often have a number shipments coming in each week and I would like to count and identify what new products that are coming in a selceted shipment and or future timeframe 

 

I have tried the formula below which is a modification of a formula from @EnterpriseDNA but I don't have it quite right. Thanks in advance

New Products = 
VAR ProductsNew = VALUES(Products[SKU.1])
VAR CurrentProducts = CALCULATETABLE(VALUES(Products[SKU.1]),
                        filter(ALL(Dates),
                        Dates[Date] > MIN(Dates[Date]) &&
                        Dates[Date] < MAX(Dates[Date]))) 

  return
  COUNTROWS(
      EXCEPT(ProductsNew,CurrentProducts))  

 

1 REPLY 1
mahoneypat
Microsoft Employee
Microsoft Employee

Typically for the count of new things, you compare the current context to the the past context with an approach like this:

 

New Products =
VAR mindate =
    MIN ( Dates[Date] )
VAR CurrentProducts =
    VALUES ( Products[SKU.1] )
VAR PastProducts =
    CALCULATETABLE (
        VALUES ( Products[SKU.1] ),
        FILTER ( ALL ( Dates ), Dates[Date] < mindate )
    )
RETURN
    COUNTROWS ( EXCEPT ( CurrentProducts, PastProducts ) )

 

If this works for you, please mark it as the solution.  Kudos are appreciated too.  Please let me know if not.

Regards,

Pat





Did I answer your question? Mark my post as a solution! Kudos are also appreciated!

To learn more about Power BI, follow me on Twitter or subscribe on YouTube.


@mahoneypa HoosierBI on YouTube


Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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