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

Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now

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
Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

February Power BI Update Carousel

Power BI Monthly Update - February 2026

Check out the February 2026 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.