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 September 15. Request your voucher.

Reply
Sperling
Advocate II
Advocate II

REMOVEFILTERS not working for me

I have a report page where I have 3 filters:

Reporting Date is in Current Month

Reported in Future = No

Reported Today = No

 

I want to make a measure that counts the Reporting Days in the month (Working days) - ignoring the two "No" filters.

This is for another measure, but I've just isolated the measure to find a solution.

My measure right now is:

    CALCULATE(
        COUNTROWS('Reporting Date'),
        FILTER(
            'Reporting Date',
            NOT ('Reporting Date'[Reporting Weekday]) IN {"Saturday", "Sunday"}
        ),
        REMOVEFILTERS(
            'Reporting Date'[Reported In Future?],
            'Reporting Date'[Reported Today?]
        )  
    )
 
However, this doesn't remove the filters.
As of today (2023-10-03) it returns a value of 1, which should be 22.
If I remove the two "No" filters from the page it returns the right value of 22.
 
Any ideas?
8 REPLIES 8
Anonymous
Not applicable

Hi @Sperling ,

 

I have made a sample with REMOVEFILTERS() on myside. It works on myside. It will remove the filters from slicer or filters in filter pane. I think your issue should be caused by your data model. Please share a sample file with me and show me a screenshot with the result you want. This will make it easier for us to find the solution.

 

Best Regards,
Rico Zhou

 

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

AntrikshSharma
Super User
Super User

@Sperling CALCULATE evaluates FILTER arguments before CALCULATE modifiers such as REMOVEFILTERS, Reporting Date inside FILTER function already gets filtered before REMOVEFILTERS and then REMOVEFILTERS is applied after which the table returned by FILTER is applied to the filter context. 

 

Use this instead

CALCULATE(
    COUNTROWS('Reporting Date'),
    NOT 'Reporting Date'[Reporting Weekday] IN {"Saturday", "Sunday"},
    REMOVEFILTERS(
        'Reporting Date'[Reported In Future?],
        'Reporting Date'[Reported Today?]
    )  
)

 

Hi Antriksh,

Unfortunately this measure doesn't work either.

Here's a screenshot of my test PBI file and DaysInMonth is the measure I'm testing out.

Sperling_0-1696400919116.png

 

Dangar332
Super User
Super User

Hi, @Sperling 

You can use edit interaction to avoide slicer effect on your visuals 

for more about edit interaction please refer these video.

 

and yah! here you use 

REMOVEFILTERS(
            'Reporting Date'[Reported In Future?],
            'Reporting Date'[Reported Today?]
        )  
as a filter modifier in calculate so it not remove filter it only remove filter context.

 

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

Hi Dangar,

Thanks for your reply.

Unfortunately the filters are not in the report itself in a slicer, but added as a filter.

It's a KPI report, so I don't want them present in the view - I could do that and hide them, but I don't think it's a great solution down the line in case someone has to take over.

 

I tried using ALL() also, but I'm not having luck getting it to work. For example, this also returns a value of 1 (final solution should also remove the "Reported Today" filter, but just tested without it):

    CALCULATE(
        COUNTROWS('Reporting Date'),
        FILTER(
            'Reporting Date',
            NOT ('Reporting Date'[Reporting Weekday]) IN {"Saturday", "Sunday"}
        ),
        ALL(
            'Reporting Date'[Reported In Future?]
        )
    )

hi, @Sperling 

var table1 = calculatetable(all(

'Reporting Date'[Reported In Future?],
            'Reporting Date'[Reported Today?] ))
 

return

    CALCULATE(
        COUNTROWS(table1),
        FILTER(
            'Reporting Date',
            NOT ('Reporting Date'[Reporting Weekday]IN {"Saturday""Sunday"}
        )
       
    )


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

Hi again,

 

Seems that this approach also counts the first sunday?

It rightfully counts today since it ignores the page filter of reported today, but still doesn't ignore reported in future.

So confusing.

Sperling_1-1696401137297.png

 

I'll look into creating a file with sample data, but its a traditional date dimension

 

hi, @Sperling  if its not working then provide some sample date without confidential information

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.