Forum Discussion
Anonymous
6 years agoNot applicable
Select the last day value dynamically
Hi guys i am new to power bi i need to calculate the stock of the last day dynamically. For example i having stocks from january 2018 to November 2019. I want to calculate the last day stock value s...
- 6 years ago
Greg_Deckler
Community Champion
6 years agoPlease see this post regarding How to Get Your Question Answered Quickly: https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490
Second, MAX and MAXX are your friends in this case. So, if you select a month in some sort of Month slicer then I assume that all of the days for September will be in context so you could do something like:
Measure =
VAR __maxDate = MAXX('Some Table',[Date])
RETURN
MAXX(FILTER('Some Table',[Date] = __maxDate),[Value])
This is all purely conjecture because I don't have any example source data.