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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch 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!

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.