cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
susheeltyagi
Helper I
Helper I

How to display the most Latest Record

Hi,

 

I am new in Power BI. I would like to get the latest records (most recent timestamp) per Serial No.

Currently I am getting the below :

 
 

Capture.JPG

My Expectation is :

 

Table Name = Devices

 

SerialNo             Status                  Timestamp
090500925     Connected            2020-09-03 12:06:21

031000694      Connected           2020-09-03 08:51:57

 

 

Please help me

 

Thanks

 

Susheel

 

1 ACCEPTED SOLUTION
Fowmy
Super User
Super User

@susheeltyagi 

You can create ht ebelow measure and assign it to the Visual Filter of the Table Visial and set it to 1

Measure = 
VAR SN = MAX(Devices[SERIAL NO]) RETURN
VAR _MAX = MAXX(
    FILTER( ALL(Devices),
        Devices[SERIAL NO] = SN
    ),
    Devices[TIME STATUS]
)

RETURN

IF( SELECTEDVALUE(Devices[TIME STATUS]) = _MAX , 1,0)

 

Fowmy_0-1599162888329.png

 

________________________

If my answer was helpful, please consider Accept it as the solution to help the other members find it

Click on the Thumbs-Up icon if you like this reply 🙂

YouTube  LinkedIn

 

Did I answer your question? Mark my post as a solution! and hit thumbs up


Subscribe and learn Power BI from these videos

Website LinkedIn PBI User Group

View solution in original post

2 REPLIES 2
FrankAT
Community Champion
Community Champion

Hi @susheeltyagi 

take a look at the following solution:

03-09-_2020_21-58-07.png

 

With kind regards from the town where the legend of the 'Pied Piper of Hamelin' is at home
FrankAT (Proud to be a Datanaut)

 

 

 

Fowmy
Super User
Super User

@susheeltyagi 

You can create ht ebelow measure and assign it to the Visual Filter of the Table Visial and set it to 1

Measure = 
VAR SN = MAX(Devices[SERIAL NO]) RETURN
VAR _MAX = MAXX(
    FILTER( ALL(Devices),
        Devices[SERIAL NO] = SN
    ),
    Devices[TIME STATUS]
)

RETURN

IF( SELECTEDVALUE(Devices[TIME STATUS]) = _MAX , 1,0)

 

Fowmy_0-1599162888329.png

 

________________________

If my answer was helpful, please consider Accept it as the solution to help the other members find it

Click on the Thumbs-Up icon if you like this reply 🙂

YouTube  LinkedIn

 

Did I answer your question? Mark my post as a solution! and hit thumbs up


Subscribe and learn Power BI from these videos

Website LinkedIn PBI User Group

Helpful resources

Announcements
August 2022 update 768x460.jpg

Check it Out!

Click here to learn more about the August 2022 updates!

August 1 episode 9_no_dates 768x460.jpg

The Power BI Community Show

Watch the playback when Priya Sathy and Charles Webb discuss Datamarts! Kelly also shares Power BI Community updates.

Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

Top Solution Authors
Top Kudoed Authors