Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
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!
User | Count |
---|---|
22 | |
11 | |
8 | |
6 | |
6 |
User | Count |
---|---|
26 | |
13 | |
11 | |
9 | |
6 |