Forum Discussion

GeekAlfPro's avatar
GeekAlfPro
Helper V
4 years ago
Solved

look up or filter data

Hello,

 

i have a table with several equipments.

i want to get the first and the last value of the day for one equipment

in the following table the green and orange value.

but i'm struggling with the dax formulas.

i tried

M_soc_depart = 
var _heure = minx(ALLSELECTED('table'), 'table'[timestamp])
return
CALCULATE(MAX('table'[value], FILTER('table', 'table'[timestamp] = _heure)))

 but it doesn't work, pbi says that i have several values....

 

any help would be welcome.

  • GeekAlfPro's avatar
    GeekAlfPro
    4 years ago

    I finally manage to get what i want

    by using firstnonblankvalue and lastnonblankvalue.

     

    thanks !

3 Replies

    • GeekAlfPro's avatar
      GeekAlfPro
      Helper V

      Hello tackytechtom ,

       

      thanks for your response.

      unfortunately, et because i wasn't explicite enough, it not exactly the solution.

      i have outliers, that's why i want to get the first data of the day and the last one

       

      your formulas give me the min and max of the values.

      i want the values associated with the min / max of timestamp.

      i hope i'm clear enough

      • GeekAlfPro's avatar
        GeekAlfPro
        Helper V

        I finally manage to get what i want

        by using firstnonblankvalue and lastnonblankvalue.

         

        thanks !