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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Reply
efjw
Helper I
Helper I

Displaying latest value on gauge visual (via DirectQuery)

Hi! I am trying to display the latest value of actualtotalbuildingwaterflow on my gauge visual. I created a new measure currentTBWF to get the latest value of actualtotalbuildingwaterflow but it returns blank. Is my dax equation wrong? Also, is the only way for me to display the latest value by using a measure? When I add actualtotalbuildingwaterflow as the Value in the gauge visual, it sums up all the values. Thanks 🙂

 

currentTBWF =
VAR LatestDatetime = MAX('changi demotagdata11'[datetime])
VAR LatestWaterFlow =
    CALCULATE(
        MAX('changi demotagdata11'[actualtotalbuildingwaterflow]),
        FILTER(
            ALL('changi demotagdata11'),
            'changi demotagdata11'[datetime] = LatestDatetime
        )
    )
RETURN
LatestWaterFlow


1 ACCEPTED SOLUTION
efjw
Helper I
Helper I

@bhanu_gautam Unfortunately that still returned as blank for me but I tried 

currentTBWF = MAX('demotagdata11'[actualtotalbuildingwaterflow]) and it works now! Thanks for your help 🙂

View solution in original post

2 REPLIES 2
efjw
Helper I
Helper I

@bhanu_gautam Unfortunately that still returned as blank for me but I tried 

currentTBWF = MAX('demotagdata11'[actualtotalbuildingwaterflow]) and it works now! Thanks for your help 🙂
bhanu_gautam
Super User
Super User

@efjw , Try updaing measure as

 

currentTBWF =
CALCULATE(
LASTNONBLANK('changi demotagdata11'[actualtotalbuildingwaterflow], 'changi demotagdata11'[datetime]),
FILTER(
ALL('changi demotagdata11'),
'changi demotagdata11'[datetime] = LASTDATE('changi demotagdata11'[datetime])
)
)




Did I answer your question? Mark my post as a solution! And Kudos are appreciated

Proud to be a Super User!




LinkedIn






Helpful resources

Announcements
Sept PBI Carousel

Power BI Monthly Update - September 2024

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

September Hackathon Carousel

Microsoft Fabric & AI Learning Hackathon

Learn from experts, get hands-on experience, and win awesome prizes.

Sept NL Carousel

Fabric Community Update - September 2024

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