Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
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 API's. The POST ExecuteQuery API with below body gives me a list of values. How can I get only a single latest record ? TIA
"queries": [
{
"query": "EVALUATE FILTER(ALL(usecase[Time],usecase[Telemetry],usecase[SensorName],usecase[SensorType],usecase[SensorID]),usecase[SensorID] = 475601) ORDER BY usecase[Time] desc"
}
],
"serializerSettings": {
"includeNulls": true
}
}
REST API ExecuteQueries @amitchandak @tamerj1 @SpartaBI
Solved! Go to Solution.
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/
Proud to be a Super User!
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/
Proud to be a Super User!
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
10 | |
9 | |
8 | |
7 | |
6 |
User | Count |
---|---|
14 | |
13 | |
11 | |
9 | |
8 |