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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
snehasissamal
Frequent Visitor

Create a measure ignoring existing page slicers

RemoveSlicerFilter.png

 

Hi,

 

I have projects with Name, Year, Planned Quarter, Actual Quarter as different quarters. Also I have two slicers Year and PlannedQuarter. I am able to show the number of planned projects in the selected quarter(s) and it's working fine.

 

But few projects planned in Q1 for example, executed in Q2 and so on. So I need to calculate the count how many acctualy executed in Q1. For that I need to remove the existing filter with REMOVEFILTER or can use ALL. So that I can ignore page slicer and apply other filters I want. But struglling with that part, any hints/help is much appreciated,

 

Attaching the .pbix file with data too for reference. Sample PBIX File 

 

 

TotalProjects = COUNTROWS(Sheet1) + 0

 

 

 

TotalActualCasesCount = 
VAR selectedQuarters = ALLSELECTED(Sheet1[PlannedQuarter])
VAR All_Projects = ALL('Sheet1')
//VAR All_Projects_RemoveFilter = REMOVEFILTERS('Sheet1', 'Sheet1'[PlannedQuarter])

RETURN
CALCULATE([TotalProjects], Sheet1[ActualQuarter ] in selectedQuarters)  + 0

 

 

 

 

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @snehasissamal 

 

Thank you very much Jihwan_Kim for your prompt reply.

 

Try this:

 

Measure TotalActualCasesCount = 
CALCULATE(
    [TotalProjects],    
    REMOVEFILTERS(Sheet1[PlannedQuarter])
) + 0

 

vnuocmsft_0-1733727717724.png

 

Regards,

Nono Chen

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

2 REPLIES 2
Anonymous
Not applicable

Hi @snehasissamal 

 

Thank you very much Jihwan_Kim for your prompt reply.

 

Try this:

 

Measure TotalActualCasesCount = 
CALCULATE(
    [TotalProjects],    
    REMOVEFILTERS(Sheet1[PlannedQuarter])
) + 0

 

vnuocmsft_0-1733727717724.png

 

Regards,

Nono Chen

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

 

Jihwan_Kim
Super User
Super User

Hi,

I am not sure if I understood your question correctly, but please try something like below and please check if it produces the result that you want.

 

TotalActualCasesCount =
VAR selectedQuarters =
    VALUES ( Sheet1[PlannedQuarter] )
RETURN
    COUNTROWS (
        FILTER ( ALL ( 'Sheet1' ), Sheet1[ActualQuarter ] IN selectedQuarters )
    )

If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Click here to visit my LinkedIn page

Click here to schedule a short Teams meeting to discuss your question.

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

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