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
rkrk7
New Member

Measure not filtering properly

I created a measure (below) that is intending to count distince FileIds in a dataset. I want it to be able to be filtered by every other column in the dataset other than Error. This worked last week but, this week it broke somehow and the file count is being filtered by the error column. I have tried all and allexcept but they produce the same results. Thanks!

 

FileCount = CALCULATE(DISTINCTCOUNT(FeeInaccuracy[FileID]),
REMOVEFILTERS(FeeInaccuracy[Error])
)
1 ACCEPTED SOLUTION
danextian
Super User
Super User

Hi @rkrk7 

Your formula should work as expected. It removes the filter from the  Error column while keeping filters on other columns intact. So, if you use this column with the measure in a visual, they should display the same values for the whole of error. However, adding another column will naturally break the values down into more detailed segments.





Dane Belarmino | Microsoft MVP | Proud to be a Super User!

Did I answer your question? Mark my post as a solution!


"Tell me and I’ll forget; show me and I may remember; involve me and I’ll understand."
Need Power BI consultation, get in touch with me on LinkedIn or hire me on UpWork.
Learn with me on YouTube @DAXJutsu or follow my page on Facebook @DAXJutsuPBI.

View solution in original post

7 REPLIES 7
v-tsaipranay
Community Support
Community Support

Hi @rkrk7 ,

 

We haven’t received an update from you in some time. Could you let us know if the issue has been resolved?
If you still require support, please let us know, we are happy to assist you.

 

Thank you.

 

v-tsaipranay
Community Support
Community Support

Hi @rkrk7 ,

 

I wanted to follow up on our previous suggestions. We would like to hear back from you to ensure we can assist you further.

 

Thank you.

v-tsaipranay
Community Support
Community Support

HI @rkrk7  ,

 

I wanted to check if you had the opportunity to review the information provided. Please feel free to contact us if you have any further questions. 


Thank you.

v-tsaipranay
Community Support
Community Support

Hi @rkrk7 ,

Thank you for reaching out to the Microsoft Fabric Community Forum.

 

Your measure, CALCULATE(DISTINCTCOUNT(FeeInaccuracy[FileID]), REMOVEFILTERS(FeeInaccuracy[Error])), is the correct way to exclude filters on the Error column while keeping filters from other columns.

 

As mentioned by @danextian and @Ashish_Mathur , this should work unless there have been changes to the visual, page filters, or data model. Make sure the Error column isn’t included in the visual or indirectly filtered by slicers or related tables. Also, avoid using ALLEXCEPT(FeeInaccuracy, FeeInaccuracy[FileID]) as suggested by @Chanty4u , since it removes filters from all columns except FileID, which is not your intended outcome.

 

If Error is from a related dimension table, consider using REMOVEFILTERS('ErrorTypes') instead. Test your measure in a simple visual and add fields (except Error) one at a time to confirm the expected results.

I hope my suggestions give you good idea, if you need any further assistance, feel free to reach out.

 

Thank you.

Ashish_Mathur
Super User
Super User

Hi,

By any chance, does this measure work?

FileCount = CALCULATE(DISTINCTCOUNT(FeeInaccuracy[FileID]),ALL(FeeInaccuracy[Error]))

Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
danextian
Super User
Super User

Hi @rkrk7 

Your formula should work as expected. It removes the filter from the  Error column while keeping filters on other columns intact. So, if you use this column with the measure in a visual, they should display the same values for the whole of error. However, adding another column will naturally break the values down into more detailed segments.





Dane Belarmino | Microsoft MVP | Proud to be a Super User!

Did I answer your question? Mark my post as a solution!


"Tell me and I’ll forget; show me and I may remember; involve me and I’ll understand."
Need Power BI consultation, get in touch with me on LinkedIn or hire me on UpWork.
Learn with me on YouTube @DAXJutsu or follow my page on Facebook @DAXJutsuPBI.
Chanty4u
Regular Visitor

Try this 

FileCount =

CALCULATE(

    DISTINCTCOUNT(FeeInaccuracy[FileID]),

    ALLEXCEPT(FeeInaccuracy, FeeInaccuracy[FileID]

)

)

Or  try this 

FileCount =

CALCULATE(

    DISTINCTCOUNT(FeeInaccuracy[FileID]),

    REMOVEFILTERS('ErrorTypes') -- or REMOVEFILTERS('ErrorTypes'[Error])

 

)

 

Helpful resources

Announcements
July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 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