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

To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.

Reply
Anonymous
Not applicable

Help with getting the latest value in a table for a certain tag

Hi

 

I'm new to Power BI and I'm been maing a mock data set in excel. I have made a dashboard which can already show only certain tags based on the room or system, but I want to make a radial gauge which shows the current, or most recent value of whatever is selected but I am struggling to find a way to pull the latest value. Any help would be appriciated!

Thanks

 

This is a sample of the table

 

RoomTagTimeValue
Room 1Centrifuge 16/13/20 12:00 AM   605
Room 1Centrifuge 16/13/20 9:00 AM   917
Room 1Centrifuge 16/13/20 12:00 PM   667
Room 1Centrifuge 16/14/20 12:00 AM   671
Room 2BMS 47736/13/20 12:00 AM   888
Room 2BMS 47736/13/20 9:00 AM   803
Room 2BMS 47736/13/20 12:00 PM   541
Room 2BMS 47736/14/20 12:00 AM   733

 

1 ACCEPTED SOLUTION
Mariusz
Community Champion
Community Champion

Hi @Anonymous 

 

Try this 

Measure = 
VAR __lastDateTime =
    CALCULATE(
        MAX( 'Table'[International DateTime] ),
        ALL( 'Table' ),
        VALUES( 'Table'[Room] ), 
        VALUES( 'Table'[Tag] )
    )
RETURN 
    CALCULATE(
        SUM( 'Table'[Value] ),
        KEEPFILTERS( 'Table'[International DateTime] = __lastDateTime )
    )

it will result in 

 
 

 

Best Regards,
Mariusz

If this post helps, then please consider Accepting it as the solution.

Please feel free to connect with me.
LinkedIn

 

image.png

View solution in original post

2 REPLIES 2
Mariusz
Community Champion
Community Champion

Hi @Anonymous 

 

Try this 

Measure = 
VAR __lastDateTime =
    CALCULATE(
        MAX( 'Table'[International DateTime] ),
        ALL( 'Table' ),
        VALUES( 'Table'[Room] ), 
        VALUES( 'Table'[Tag] )
    )
RETURN 
    CALCULATE(
        SUM( 'Table'[Value] ),
        KEEPFILTERS( 'Table'[International DateTime] = __lastDateTime )
    )

it will result in 

 
 

 

Best Regards,
Mariusz

If this post helps, then please consider Accepting it as the solution.

Please feel free to connect with me.
LinkedIn

 

image.png

Anonymous
Not applicable

That worked flawlessly. Thanks for the help @Mariusz !

Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

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

Top Solution Authors