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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
oslosa
Helper I
Helper I

Date of first sales per product

Hi I have a dataset of looking like |Product name|Date|Sales| and I want to find the date of first sales, i.e. the Date for each product corresponding to the first non-zero value. In excel I would display the data in matrix format and use an Index(match)-function, but it is more tricky in the list format of power bi.

 

I am trying something like this, but I am not sure how to make the filter so that the measure runs per product (Product name=Product name is probably not filtering anything):

Launch year =
MAXX (
TOPN ( 1, FILTER ( Table ,[Product name]=[Product name]&&[Net turnover (OC)] <> 0 ),[Date].[Year], ASC ),
[Date].[Year]
)
This retrieves the first non-zero value for the sumtotal, so all products get the same launch year. Can anyone help me get the individual dates per product?
1 ACCEPTED SOLUTION
Anonymous
Not applicable

you could use a calculated column with the following formula:

First Sale Date = minx(filter('Table','Table'[Product]=earlier('Table'[Product]) && 'Table'[Sales]>0),'Table'[Sale Date])

View solution in original post

1 REPLY 1
Anonymous
Not applicable

you could use a calculated column with the following formula:

First Sale Date = minx(filter('Table','Table'[Product]=earlier('Table'[Product]) && 'Table'[Sales]>0),'Table'[Sale Date])

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Prices go up Feb. 11th.

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

Jan NL Carousel

Fabric Community Update - January 2025

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