I want to create running totals (using a measure). However, if I apply slicers I want the values to adjust according to this selection.
For example I have a table with my clothes purchases for 2017-2018 (date of purchase;brand of product; product type; cost amount).
If I slice for Hugo Boss brand; year 2018 I want my March value to retrieve the sum of costs of all Hugo Boss products between first day of the raw table (in this case 1st of January 2017) and the last day of the month in my selection (in this case: 31st of March 2018).
At the moment my function is as shown below but does not work.
Cumulative =
CALCULATE (
SUM ( 'Clothes Purchases'[Cost] ),
FILTER (
ALL ( 'Clothes Purchases' ),
'Clothes Purchases'[Acctg Date] <= MAX ( 'Clothes Purchases'[Acctg Date] )
)
)
Can someone please help?
Thanks, Domingos