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
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
Sept PBI Carousel

Power BI Monthly Update - September 2024

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

September Hackathon Carousel

Microsoft Fabric & AI Learning Hackathon

Learn from experts, get hands-on experience, and win awesome prizes.

Sept NL Carousel

Fabric Community Update - September 2024

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