Forum Discussion
svandamme
8 years agoFrequent Visitor
Stock Movements Calculation
Hi, I have a stock movements table that contains stock movements for the dates there is a stock movement, so not all the dates are in the table. I want to create a report that shows for every dat...
- Anonymous8 years ago
Hi svandamme,
Maybe you can try to use below formula:
Measure = var temp=CALCULATE ( SUM ( F_STOCK_MOVEMENTS[M_Stock_Movement_Qty] ), FILTER ( ALLSELECTED ( F_STOCK_MOVEMENTS ), [FK_Date] <= MAX ( F_STOCK_MOVEMENTS[FK_Date]) ), VALUES ( F_STOCK_MOVEMENTS[BK_Item_Code] ), VALUES ( F_STOCK_MOVEMENTS[BK_Location_Code] ) ) return if(temp= BLANK(),[Stock],temp)My formula can't replace previous blank records, so I use 'stock' measure to replace blank part.
Regards,
Xiaoxin Sheng
svandamme
8 years agoFrequent Visitor
Anonymous
8 years agoNot applicable
Hi svandamme,
Maybe you can try to use below formula:
Measure =
var temp=CALCULATE (
SUM ( F_STOCK_MOVEMENTS[M_Stock_Movement_Qty] ),
FILTER (
ALLSELECTED ( F_STOCK_MOVEMENTS ),
[FK_Date] <= MAX ( F_STOCK_MOVEMENTS[FK_Date])
),
VALUES ( F_STOCK_MOVEMENTS[BK_Item_Code] ),
VALUES ( F_STOCK_MOVEMENTS[BK_Location_Code] )
)
return
if(temp= BLANK(),[Stock],temp)
My formula can't replace previous blank records, so I use 'stock' measure to replace blank part.
Regards,
Xiaoxin Sheng