Forum Discussion
Find Latest Value from Array
- 6 years ago
Hmm, I am guessing that the last row of data doesn't have a reading. Can you try changing the mesure to this?
Last Battery = VAR _MaxTime = CALCULATE ( MAX ( 'SensoEvents'[TimeStamp] ), KEEPFILTERS ( ALL ( 'SensoEvents'[TimeStamp] ) ) ) RETURN CALCULATE ( SUM ( 'SensoEvent'[Battery] ), 'SensoEvents'[TimeStamp] = _MaxTime )See if keeping the other filters lets us get a result.
The field names are correct, I am not sure if the timestamp field is classified as a time field. It seems to be the same as the battery field. Is there a way to declare it as a date/time field?
Andrei
Can you share your .pbix file? It's difficult to know what is causing a problem without having all the context.
- AndreiFlorian6 years agoFrequent Visitor
Ok, I have attached the a link to the file here.
Andrei.
- jdbuchanan716 years agoSuper User
It looks like this book is connected to a PowerBI dataset yes? I am not able to open it to see the error.
Can you take a screen shot of the measure and the error that you get when you enter the data along with the tables? Something like this:
Maybe I can see the problems from that.
- AndreiFlorian6 years agoFrequent VisitorYes, that is the error I’m getting. Could it be because of the sample not being present? I can see the data on a table though. I have posted the content of the error in the previous post
- jdbuchanan716 years agoSuper User
My screen shot was just an example of what I was asking for and the error I showed is different than the one you said you were getting.
Parameter is not the correct type Cannot find name '[Timestamp]'
I wanted a screen shot of your screen, including the measure and the tables with the error you get showing. Since I cannot open your model I don't know if you have a table name wrong or a field name wrong or what.