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
v-frfei-msft
Community Support
6 years agoHi Anonymous ,
Here I have created a sample for your reference. We can use a measure as below to work it out.
Measure =
VAR LASTDAY =
CALCULATE ( MAX ( 'Table'[date] ), ALLSELECTED ( 'Table' ) )
RETURN
CALCULATE (
SUM ( 'Table'[value] ),
FILTER ( 'Table', 'Table'[date] = LASTDAY )
)
For more details, please check the pbix as attached.