Forum Discussion
Anonymous
7 years agoNot applicable
Filter context using MAX
Hi, I'm using this pbix file https://ufile.io/8gy9deoz and I'm using the following equation to find the cumulative total. I'm confused because max('Product'[Date]) appears to find the maximum Pro...
- 7 years ago
Anonymous I guess this will answer your question if you change your measure as below.
CALCULATE(sum('Product'[Volume]), FILTER( all('Product'), 'Product'[Date] <= CALCULATE( max('Product'[Date]) ) ) )
parry2k
7 years agoSuper User
Anonymous I guess this will answer your question if you change your measure as below.
CALCULATE(sum('Product'[Volume]),
FILTER(
all('Product'),
'Product'[Date] <= CALCULATE( max('Product'[Date]) )
)
)- Anonymous7 years agoNot applicable
Thanks parry2k I think the penny's dropped. So ALL doesn't change the filter context of the whole of the calculate statement, just for the table expression used for iteration (not sure if iteration is the correct word!)
Thanks,
CM