Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
4 years ago
Solved

REST API ExecuteQueries

Hi ...I am new to BI & DAX . Please help me to have a better understanding. I have the a data table (given above) from which I should retreive the latest single record based on SensorId through...
  • ValtteriN's avatar
    4 years ago

    Hi Anonymous ,

    If you want to get only the latest value you can use TOPN in your query
    e.g. 
    EVALUATE TOPN(1,FILTER(ALL(usecase[Time],usecase[Telemetry],usecase[SensorName],usecase[SensorType],usecase[SensorID]),usecase[SensorID] = 475601) ORDER BY usecase[Time] desc)

    I hope this post helps to solve your issue and if it does consider accepting it as a solution and giving the post a thumbs up!

    My LinkedIn: https://www.linkedin.com/in/n%C3%A4ttiahov-00001/