Forum Discussion
LLJ1221
2 years agoHelper I
have the difference between 2 dates dynamically
Hello, I don't know if my problem has already been asked on the forum but I haven't found any answers. I have the following table: Transaction Operation number Operation number_1...
- 2 years ago
Are you able to simply replace the FIRSTDATE() function above with MIN(). That should return the same result, provided there are no blanks.
vicky_
2 years agoSuper User
Please try the following:
dates selected =
var OPNo = CALCULATE(FIRSTDATE('Table'[date operation]), ALLEXCEPT('Table', 'Table'[Operation number]))
var OPNo1 = CALCULATE(FIRSTDATE('Table'[date operation]), ALLEXCEPT('Table', 'Table'[Operation number_1]))
return DATEDIFF(OPNo, OPNo1, DAY)- LLJ12212 years agoHelper I
Hi vicky_ ,
Thanks for your feedback.
I published to specify sue I susu in Direct Query mode and I know that I had already had problems with the "FirstDate" function because it was not supported in direct query mode
- vicky_2 years agoSuper User
Are you able to simply replace the FIRSTDATE() function above with MIN(). That should return the same result, provided there are no blanks.