Forum Discussion
Anonymous
5 years agoNot applicable
Return current value from LastNonBlank by date
Hi, I have a table "DividendStocks" and I need a column or measure like "Shares": StockTicker Date Purchase Shares (what I need) PEP Jan 0 50 GILD Jan 0 200 SVK Jan 10...
- 5 years ago
Hi Anonymous,
Try measure as:
shares = CALCULATE( SUM(DividendStocks[Purchase]), FILTER( ALL(DividendStocks), DividendStocks[Date]<=MAX('Table'[Date]) && DividendStocks[Purchase]<>0 && DividendStocks[StockTicker]=MAX(DividendStocks[StockTicker]) && DividendStocks[StockTicker] <>""))Here is the output:
Here is the demo, please try it: Return current value from LastNonBlank by date
Best Regards,
Link
If this post helps then please consider Accept it as the solution to help the other members find it more quickly.
v-xulin-mstf
Community Support
5 years agoHi Anonymous,
Try measure as:
shares =
CALCULATE(
SUM(DividendStocks[Purchase]),
FILTER(
ALL(DividendStocks),
DividendStocks[Date]<=MAX('Table'[Date]) && DividendStocks[Purchase]<>0 && DividendStocks[StockTicker]=MAX(DividendStocks[StockTicker]) && DividendStocks[StockTicker] <>""))Here is the output:
Here is the demo, please try it: Return current value from LastNonBlank by date
Best Regards,
Link
If this post helps then please consider Accept it as the solution to help the other members find it more quickly.