Forum Discussion
awff
4 years agoHelper III
Finding the earliest date across multiple rows
Hi fellow PBI'ers, I'm trying to create a measure that lists the earliest date a product was held by customers. Below is a simplified mock up data with the earliest dates bolded: Clien...
- 4 years ago
Hi awff ,
Try this measure to see if this will meet your needs:
Measure = CALCULATE(MIN('Table'[Start Date]),ALLEXCEPT('Table','Table'[Client],'Table'[Product]))Best Regards,
Liang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
awff
4 years agoHelper III
I played around with the syntax and this seems to work as a measure:
First Start Date =
Calculate(
FIRSTDATE(table[Start Date]),
Filter(
ALLEXCEPT(table, table[Account], table[Product]),
table[Start Date] <= Min(table[Start Date])))Cross checking with a small sample of the data seemed to return the correct values so far.
- awff4 years agoHelper III
Ok, So this only seems to work when drilled down clicking on a row in the table.
But when not filtered, It seems to returning the earliest date of the entire data set for the particular product!
- V-lianl-msft4 years agoCommunity Support
Hi awff ,
Try this measure to see if this will meet your needs:
Measure = CALCULATE(MIN('Table'[Start Date]),ALLEXCEPT('Table','Table'[Client],'Table'[Product]))Best Regards,
Liang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.