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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
teepeeee123
Frequent Visitor

fitler for latest timestamp with different date powerbi help

how do i sort for the latest timestamp for each individual date.

 

Date                            value

11/01/24 7:00 am        5

11/01/24 9:00 am        7

11/01/24 10:00 am        4

12/01/24 4:00 am        5

12/01/24 7:00 am        5

12/01/24 9:00 am        5

 

and returns/filters

 

Date                            value

11/01/24 10:00 am       4

12/01/24 9:00 am        5

 

2 ACCEPTED SOLUTIONS
ryan_mayu
Super User
Super User

@teepeeee123 

in pq, split the date and time column

= Table.AddColumn(#"Inserted Date", "Time", each Time.From([date]), type time)

= Table.AddColumn(#"Inserted Date", "Time", each Time.From([date]), type time)

 

then you can use dax to create a  new column

 

Column = if('Table'[Time]=CALCULATE(max('Table'[Time]),ALLEXCEPT('Table','Table'[Date.1])),"Last Value")

11.PNG

at last you can use the new column to filter

12.PNG

pls see the attachment below





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




View solution in original post

Anonymous
Not applicable

Hi @teepeeee123 ,

Here some steps that I want to share, you can check them if they suitable for your requirement.

Here is my test data:

vheqmsft_0-1705999448350.png
1.Create a culculate table

 

Latest Record by Date = 
SUMMARIZE(
    'Table',
    'Table'[Date].[Date], 
    "Latest Value", MAXX(
        FILTER(
            'Table',
            'Table'[Date].[Date] = EARLIER('Table'[Date].[Date])
        ),
        'Table'[Date]
    )
)

 

2.Confirms that there is a 1-to-1 relationship between date and latest Value

vheqmsft_1-1705999652881.png

3.Use Latest value to filter the final table

vheqmsft_2-1705999807706.png

 

Best regards

Albert He

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
 

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

Hi @teepeeee123 ,

Here some steps that I want to share, you can check them if they suitable for your requirement.

Here is my test data:

vheqmsft_0-1705999448350.png
1.Create a culculate table

 

Latest Record by Date = 
SUMMARIZE(
    'Table',
    'Table'[Date].[Date], 
    "Latest Value", MAXX(
        FILTER(
            'Table',
            'Table'[Date].[Date] = EARLIER('Table'[Date].[Date])
        ),
        'Table'[Date]
    )
)

 

2.Confirms that there is a 1-to-1 relationship between date and latest Value

vheqmsft_1-1705999652881.png

3.Use Latest value to filter the final table

vheqmsft_2-1705999807706.png

 

Best regards

Albert He

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
 

ryan_mayu
Super User
Super User

@teepeeee123 

in pq, split the date and time column

= Table.AddColumn(#"Inserted Date", "Time", each Time.From([date]), type time)

= Table.AddColumn(#"Inserted Date", "Time", each Time.From([date]), type time)

 

then you can use dax to create a  new column

 

Column = if('Table'[Time]=CALCULATE(max('Table'[Time]),ALLEXCEPT('Table','Table'[Date.1])),"Last Value")

11.PNG

at last you can use the new column to filter

12.PNG

pls see the attachment below





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

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

Top Solution Authors