Forum Discussion
DAX Formula to Return First Date Based on Other column
- 7 years ago
Anonymous
try
Original Due Date = CALCULATE ( MIN ( 'Table'[Due Date] ), ALLEXCEPT ( 'Table', 'Table'[Item] ) )
- Anonymous7 years ago
Dear rdcooper,
Is this you expected?
The DAX Expression i have used to get this as follows.
Measure_OrderDate = CALCULATE(MIN(PBI_Data[OrderDate]), ALLEXCEPT(PBI_Data,PBI_Data[Item]))
Regards,
Pradeep
- Anonymous7 years ago
You can use Groupby in PQ to get that figure pretty easily:
You can use Groupby in PQ to get that figure pretty easily:
- Anonymous7 years agoNot applicable
Wow thank you so much Zubair_Muhammad, Anonymous, Anonymous - can't believe it was that easy! I had actually found the similar solution Zubair_Muhammad offered in an almost identical post to mine (here), but I didn't think "ALLEXCEPT" would make sense since the name of the function is counterintuitive - I would have thought that would have returned the earliest due date for all rows except the ones with the Item name I was interested in. Weirdly enough, it works though. Thanks again!
- indradutta3 years agoNew Member
Using this formula it will only return the first date of my calender table. If I want to see the first sales date of my table this formula will not work. I need calculate the min date of the calender table when sales values in not blank. Can anyone help me on this.