Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
AndreiFlorian
Frequent Visitor

Find Latest Value from Array

Hi there,

I am aware that there are other threads to do with this issue and I have looked over them though I did not manage to make the project work. I have an array called batteryVoltage which stores battery voltage and I want to get the last value appended to this array to use on a card. What would be the easiest way to do this?

 

Andrei.

1 ACCEPTED SOLUTION

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.

View solution in original post

18 REPLIES 18

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

Find out what's new and trending in the Fabric Community.