Forum Discussion
Anonymous
3 years agoNot applicable
minimum value between 2 dates
Hello, I want to calcule a minimum and maximum for value that i have in table X. But i want to have the minimum and maximum between 2 dates that i have in table Y. Exemple : Table X : ...
- 3 years ago
Hi, Anonymous
Please try formula like:
minimum = CALCULATE ( MIN ( TableX[Value] ), FILTER ( TableX, TableX[ART] = SELECTEDVALUE ( TableY[ART] ) && TableX[Date] >= SELECTEDVALUE ( TableY[Date A] ) && TableX[Date] <= SELECTEDVALUE ( TableY[Date B] ) ) )Your expected result seems to have wrong value, please check again.
Result:
Best Regards,
Community Support Team _ Eason
Mahesh0016
3 years agoSuper User
MaxValue = CALCULATE(MAX(X[Value]),DATEDIFF(Y[Date A],Y[Date B],DAY),ALLEXCEPT(X,X[ART]))
MinValue = CALCULATE(MIN(X[Value]),DATEDIFF(Y[Date A],Y[Date B],DAY),ALLEXCEPT(X,X[ART]))
Anonymous
3 years agoNot applicable
Hello,
I tried your suggestion but it's donesn't work.
I add a exemple in the tables just to be more specific for the result that i want :
Thanks for your hepl
- v-easonf-msft3 years agoCommunity Support
Hi, Anonymous
Please try formula like:
minimum = CALCULATE ( MIN ( TableX[Value] ), FILTER ( TableX, TableX[ART] = SELECTEDVALUE ( TableY[ART] ) && TableX[Date] >= SELECTEDVALUE ( TableY[Date A] ) && TableX[Date] <= SELECTEDVALUE ( TableY[Date B] ) ) )Your expected result seems to have wrong value, please check again.
Result:
Best Regards,
Community Support Team _ Eason