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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

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
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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

Top Solution Authors