cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
blaferriere Frequent Visitor
Frequent Visitor

Re: Find beginning date/time and end date/time, calculate difference from another column

@AlB

 

It's saying that the following:

 

The syntax for 'table' is incorrect. (DAX(VAR _CurrentDateValues = CALCULATETABLE ( VALUES ( table[Module Time] ), FILTER ( ALL(table), table[Module Time].[Date] = EARLIER ( table[Module Time].[Date] ) ) )VAR _EarliestDateTime = FIRSTNONBLANK ( _CurrentDateValues, 1 )VAR _LatestDateTime = LASTNONBLANK ( _CurrentDateValues, 1 )VAR _EarliestFuel = LOOKUPVALUE ( table[Idle fuel], table[Module Time], _EarliestDateTime )VAR _LatestFuel = LOOKUPVALUE ( table[Idle fuel], table[Module Time], _LatestDateTime )RETURN _LatestFuel - _EarliestFuel)).

Highlighted
Super User
Super User

Re: Find beginning date/time and end date/time, calculate difference from another column

@blaferriere

Use 'table'  (between single quotes) instead of table

Table is a reserved keyword

blaferriere Frequent Visitor
Frequent Visitor

Re: Find beginning date/time and end date/time, calculate difference from another column

@AlB

 

Fantastic! You solved it! Thank you very much!

Super User
Super User

Re: Find beginning date/time and end date/time, calculate difference from another column

@blaferriere

Cool. Perhaps some kudos would be appropriate then after so much  back and forth? Smiley Happy