Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
Hello,
I'm trying to get a value from table which has a recent datetime.
I'm trying this logic but its not working :
Measure =
VAR __time = MAX( table[DateTime] )
RETURN
CALCULATE( AVERAGE( table[values] ), table[DateTime] >= __time )
Thanks to the great efforts by MS engineers to simplify syntax of DAX! Most beginners are SUCCESSFULLY MISLED to think that they could easily master DAX; but it turns out that the intricacy of the most frequently used RANKX() is still way beyond their comprehension! |
DAX is simple, but NOT EASY! |
Hi, @mohittimpus
Please correct me if I wrongly understood your question.
Please check the below picture and the measure, whether it is what you are looking for.
Hi, My name is Jihwan Kim.
If this post helps, then please consider accept it as the solution to help other members find it faster, and give a big thumbs up.
Linkedin: linkedin.com/in/jihwankim1975/
Twitter: twitter.com/Jihwan_JHKIM
@mohittimpus , Try like
measure =
var _max = Maxx( ALL ( table ), table[DateTime] ) //OR //Maxx( ALLSelected ( table ), table[DateTime] )
return
CALCULATE (
AVERAGE ( table[values] ),
FILTER ( ALL ( table ), table[DateTime] =_max )
)
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
10 | |
10 | |
7 | |
6 | |
6 |
User | Count |
---|---|
17 | |
14 | |
11 | |
9 | |
7 |