Forum Discussion
baronraghu_3011
3 years agoFrequent Visitor
Lookupvalue trouble
Hi All, I need to pickup the last traded price of a particular stock into a new table Table 1 has last 5 years historic data of stock - ABC Table 2 has list of stock names i was trying...
- 3 years ago
baronraghu_3011
Could it be that there are multiple transactions in one day for a stock name? If there is more than one transaction, it cannot be converted to a scalar value. If this is the case, you can take the maximum stock price per day, for example.last traded price of stock = CALCULATE ( MAX ( Table1[Stock Price] ), Table1[Date] = TODAY () - 1, ALLEXCEPT ( Table2, Table2[Stock Name] ) )
baronraghu_3011
3 years agoFrequent Visitor
Hi,
I tried doing as you said, the formula didn give me any error but however, the return value was blank
Barthel
3 years agoSolution Sage
baronraghu_3011
Could it be that there are multiple transactions in one day for a stock name? If there is more than one transaction, it cannot be converted to a scalar value. If this is the case, you can take the maximum stock price per day, for example.
last traded price of stock =
CALCULATE (
MAX ( Table1[Stock Price] ),
Table1[Date]
= TODAY () - 1,
ALLEXCEPT ( Table2, Table2[Stock Name] )
)