Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
3 years ago
Solved

Tricky - MAX Date Calculated Column

HI Experts

I need to work out the latest ACT Date date Based on ID and NUM columns - the ACTDAte column must have dates against ALL ID and ALL NUM in order to get the MAX date.

 

As shown in our example data below we do not have a ACT date for ID 1257111 and NUM 346 - in this case new calcalated column return back blank as we have no ACT DAte for NUM 346 which is a part of ID 1257111, if we had ACT Dates then find the latest date in ACT DAte column and populate that into the new calculated column,..

 

 

End Result

 

Measures not working

Max Date =

 IF(

    [ACTFINISH] = BLANK(),BLANK(),

     CALCULATE( MAX('Table2'[ACTDate]),

         FILTER('Table2', 'Table2'[ID] = ('Table2'[ID] ) &&

         'Table2''[NUM] = MAX('Table2''[NUM] ))))

 

4 Replies