Forum Discussion
Anonymous
7 years agoNot applicable
Error in my code?
Hey! Can anyone see what gets wrong with my DAX formula? I write following: NewRunLoad = VAR minIndx = CALCULATE ( MAX ( Data[Index] ), ALLEXCE...
- 7 years ago
Hi Anonymous,
Please refer to below DAX formula:
NewRunLoad = IF ( CALCULATE ( MAX ( Data[Index] ), FILTER ( ALLEXCEPT ( Data, Data[Device] ), [Index] < EARLIER ( Data[Index] ) ) ) = BLANK (), BLANK (), Data[TimeLoaded_LC] - CALCULATE ( SUM ( Data[TimeLoaded_LC] ), FILTER ( ALLEXCEPT ( Data, Data[Device] ), [Index] = EARLIER ( Data[Index] ) - 1 ) ) )Best regards,
Yuliana Gu
Greg_Deckler
7 years agoCommunity Champion
Is this a measure?
Seems like your > sign in your minIndx VAR should be a < sign.