Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
Hi everyone, I am a bit confused about what can the slicer filter and what cannot in the visualization.
I created a measure which calculates the cumulative sales revenue:
Cumulative Sales Actual =
CALCULATE (
SUM('Actual data'[Net sales revenue]),
FILTER (
ALL ( 'Actual data'),
('Actual data'[Period/year] <= MAX ( 'Actual data'[Period/year] )) && (YEAR('Actual data'[Period/year]) = YEAR( MAX ('Actual data'[Period/year])))
)
)
In the same table, I have a column called Division. I add the slicer of Divsion and try to get the cumulative sales actual for specific division, but find that the Cumulative Sales Actual doesn't change. But if I add slicer for Period.year, the cumulative sales actual changes. So I am confused with the algorithm with the slicer. Can anyone help me explane it?
Solved! Go to Solution.
The results you see have nothing to do with the slicer.
When you write ALL('Actual data'), you remove all filters from the table. Therefore, slicing by 'Actual data'[Division] has no effect on the calculation.
The reason why you see different results when you slice by 'Actual data'[Period/year] is that MAX('Actual data'[Period/year]) is evaluated in the original filter context, before you override it with ALL. Hence, changing the value of 'Actual data'[Period/year] influences the calculations.
I would change your formula to the following one:
Cumulative Sales Actual =
CALCULATE (
SUM ( 'Actual data'[Net sales revenue] ),
FILTER (
ALL ( 'Actual data'[Period/year] ),
( 'Actual data'[Period/year] <= MAX ( 'Actual data'[Period/year] ) )
&& (
YEAR ( 'Actual data'[Period/year] )
= YEAR ( MAX ( 'Actual data'[Period/year] ) )
)
)
)
The results you see have nothing to do with the slicer.
When you write ALL('Actual data'), you remove all filters from the table. Therefore, slicing by 'Actual data'[Division] has no effect on the calculation.
The reason why you see different results when you slice by 'Actual data'[Period/year] is that MAX('Actual data'[Period/year]) is evaluated in the original filter context, before you override it with ALL. Hence, changing the value of 'Actual data'[Period/year] influences the calculations.
I would change your formula to the following one:
Cumulative Sales Actual =
CALCULATE (
SUM ( 'Actual data'[Net sales revenue] ),
FILTER (
ALL ( 'Actual data'[Period/year] ),
( 'Actual data'[Period/year] <= MAX ( 'Actual data'[Period/year] ) )
&& (
YEAR ( 'Actual data'[Period/year] )
= YEAR ( MAX ( 'Actual data'[Period/year] ) )
)
)
)
Thank you very much! I finally understand!
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!