Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
Anonymous
Not applicable

Calculate With Filter but ignoring slicers

Hello,

As the title says I want to calculate the sum of a column ignoring the slicers in place.

It can be done with ALL.

Measure=Calculate(sum(table[amounts]),All(Table))

However I also want to filter sum of the amounts to the value of another column , year.

Measure=Calculate(sum(table[amounts),Filter(table,Table[Year]="2020"))

Something like above but which ignores the slicers. Is it possible?

Thanks

2 ACCEPTED SOLUTIONS
amitchandak
Super User
Super User

@Anonymous , Not sure I got you completely. Try like

Measure=Calculate(sum(table[amounts),Filter(all(table),Table[Year]="2020"))

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

View solution in original post

Anonymous
Not applicable

Hi  @Anonymous ,

I created the data:

v-yangliu-msft_1-1621576121162.png

Here are the steps you can follow:

1. Create measure.

select =
var _selectyear=SELECTEDVALUE('Table'[Year])
return
IF(HASONEVALUE('Table'[date]),
CALCULATE(SUM('Table'[amount]),FILTER(ALL('Table'),'Table'[Year]=_selectyear)),
SUMX(ALL('Table'),'Table'[amount]))

2. Result.

v-yangliu-msft_2-1621576121164.png

 

 

Best Regards,

Liu Yang

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

4 REPLIES 4
Anonymous
Not applicable

Hi  @Anonymous ,

I created the data:

v-yangliu-msft_1-1621576121162.png

Here are the steps you can follow:

1. Create measure.

select =
var _selectyear=SELECTEDVALUE('Table'[Year])
return
IF(HASONEVALUE('Table'[date]),
CALCULATE(SUM('Table'[amount]),FILTER(ALL('Table'),'Table'[Year]=_selectyear)),
SUMX(ALL('Table'),'Table'[amount]))

2. Result.

v-yangliu-msft_2-1621576121164.png

 

 

Best Regards,

Liu Yang

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Anonymous
Not applicable

Thanks @Anonymous . This works as well.

Anonymous
Not applicable

@amitchandak You did get me completely and your measure works for me. Thanks

 

Encouraged by your quick reply, I would like to ask another question. 

What would you suggest if I want the slicer to be reactive but, the row context is to be ignored? In other words, the measure returns the sum as per the selected slicer but the total amount does not change to the row context.

 

amitchandak
Super User
Super User

@Anonymous , Not sure I got you completely. Try like

Measure=Calculate(sum(table[amounts),Filter(all(table),Table[Year]="2020"))

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.

Top Solution Authors