Forum Discussion
Anonymous
4 years agoNot applicable
DAX - Substract
Dear all, I'm trying to create a DAX formula to subtract the MAX from the MIN but without taking into consideration the value O in the column Kilometerstand. I can't filter the values without 0 a...
- 4 years ago
Try
My Measure = IF ( 2022 = 0, 1, MAX ( '2022'[Kilometerstand] ) - CALCULATE ( MIN ( '2022'[Kilometerstand] ), '2022'[Kilometerstand] > 0 ) )
johnt75
Super User
4 years agoTry
My Measure =
IF (
2022 = 0,
1,
MAX ( '2022'[Kilometerstand] )
- CALCULATE ( MIN ( '2022'[Kilometerstand] ), '2022'[Kilometerstand] > 0 )
)
- Anonymous4 years agoNot applicable
johnt75Is there a possibility to that the calculation follows a date filter ?
Example: I would like to filter on different months and then get the calculation performed just on this values. Would I need to adjust the Dax formula
- johnt754 years ago
Super User
As long as there is an active relationship from the date table to the 2022 table then it should just work, I don't think any changes are needed.