Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago
Solved

Martix totals

Hello all,

 

I have an issue with the totals in a Matrix. I have a measure that gives me the last non blanks to show me the product stock on any given moment. The indevidual numbers are correct but the totals are wrong. I understand to some degree that Measures are calulated for totals separately from the rows but i cant get this working.

 

I have a measure current_stock that gives me the last known stock of an item:

calculate(LASTNONBLANK(DM_stock[stock_amount];( DM_stock[stock_amount]));FILTER(DM_stock;DM_stock[%key_date]=max('Calendar'[%key_date])))
as soon as I collapse an articlegroup the numbers are all off.
 
 
Please help.
 
Sincerely,
Erik
 

3 Replies