Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!
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):
Solved! Go to Solution.
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])
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])
User | Count |
---|---|
47 | |
27 | |
23 | |
18 | |
15 |
User | Count |
---|---|
55 | |
34 | |
18 | |
17 | |
15 |