Forum Discussion

M_SBS_6's avatar
M_SBS_6
Icon for Helper V rankHelper V
2 years ago
Solved

Link rows of data

Hi,    I have 4 rows of data and what I want is to pull the min and max of the dates.    I currently use the following dax:   Earliest Date =  Calculate (min(test[datetime]), allexcept(test, t...
  • Anonymous's avatar
    Anonymous
    2 years ago

    Hi M_SBS_6 ,

     

    I grouped them by Even function and you can check the result as follows:

    Even = EVEN([ID])
    
    Earliest Date = var _t =ADDCOLUMNS('Table',"Earliest Date",MINX(FILTER(ALL('Table'),[Even]=EARLIER([Even])),[DateTime]))
    RETURN MINX(_t,[Earliest Date])
    
    Latest Date = var _t =ADDCOLUMNS('Table',"Latest Date",MAXX(FILTER(ALL('Table'),[Even]=EARLIER([Even])),[DateTime]))
    RETURN MAXX(_t,[Latest Date])

     

    An attachment for your reference. Hope it helps!

     

    Best regards,
    Community Support Team_ Scott Chang

     

    If this post helps then please consider Accept it as the solution to help the other members find it more quickly.