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
LLGreen
Frequent Visitor

DAX Measure needed: Total count based on criteria that ignores Page Level filter

I needed to get the total count of records based on specific criteria while completely ignoring a filter in the "Filters on this page" section of the Filter pane. First, here's a sample of my data:

Record IDCustomerStatusNameTypeDate
000001Customer ACompleteAIntake12/31/2022
000002Customer ACompleteBOutbound1/1/2023
000003Customer AAdjustedCProcess4/1/2024
000004Customer AComplete Inbound4/4/2024
000005Customer APendingDIntake1/1/2025
000006Customer APendingEOutbound2/28/2025
000007Customer BComplete Process5/1/2025
000008Customer BAdjustedFInbound12/31/2022
000009Customer BCompleteGIntake1/1/2023
000010Customer BPendingHOutbound4/1/2024
000011Customer BPendingIProcess4/4/2024
000012Customer BAdjustedJInbound1/1/2025
000013Customer CPending Intake2/28/2025
000014Customer CPendingKOutbound12/31/2022
000015Customer DCompleteLProcess1/1/2023
000016Customer DCompleteMInbound4/1/2024
000017Customer DPendingNIntake4/4/2024
000018Customer DAdjusted Outbound1/1/2025
000019Customer DPendingOProcess2/28/2025
000020Customer DPending Inbound4/15/2025

 

I'm trying to count the number of Record ID's for all Customers (i.e., ignoring the page level filter where the customer is selected) where:

  1. The Status is "Complete" or "Adjusted",
  2. The Name is not "",
  3. The Type does not contain the string "bound"

There is also a Date slicer on the page that is supposed to affect the count. I tried the following DAX formula, but the "all customer" total changes whenever I select a different Customer on the page level filter: 

Count_AllCustomers = CALCULATE(DISTINCTCOUNT(Table1[Record ID]),FILTER(ALLEXCEPT(Table1,Table1[Date]),(Table1[Status]="Complete"||Table1[Status]="Adjusted")&&Table1[Name]<>""&&NOT(CONTAINSSTRING(Table1[Type],"bound"))))

Any suggestions on how to change this so that the total count only changes if the Date slicer is adjusted and not when the Customer is changed?

1 ACCEPTED SOLUTION

Actually, my original DAX formula was giving me the errant totals. I had to edit the formula as I entered it incorrectly in my original post (that's what my "corrected" post was about). It turns out the issue was due to the "ALLEXCEPT(Table1,Table1[Date])" portion of the formula. Even though my date slicer didn't change when I would select a new Customer on the page filter, selecting a Customer caused my formula to only consider records in between the max and min dates associated with that customer. I solved the problem by using an unconnected Date table for the slicer and adjusted my formula to use the max and min dates shown in the slicer.

View solution in original post

4 REPLIES 4
V-yubandi-msft
Community Support
Community Support

Hi @LLGreen ,

We noticed we haven't received a response from you yet, so we wanted to follow up and ensure the solution we provided addressed your issue. If you require any further assistance or have additional questions, please let us know.

Your feedback is valuable to us, and we look forward to hearing from you soon.

 

Thanks..

Actually, my original DAX formula was giving me the errant totals. I had to edit the formula as I entered it incorrectly in my original post (that's what my "corrected" post was about). It turns out the issue was due to the "ALLEXCEPT(Table1,Table1[Date])" portion of the formula. Even though my date slicer didn't change when I would select a new Customer on the page filter, selecting a Customer caused my formula to only consider records in between the max and min dates associated with that customer. I solved the problem by using an unconnected Date table for the slicer and adjusted my formula to use the max and min dates shown in the slicer.

V-yubandi-msft
Community Support
Community Support

Hi @LLGreen ,

Thank you for being a part of the Microsoft Fabric community.

I tested your scenario using the DAX formula you shared, and it worked correctly on my end as well. Could you confirm if the DAX solution resolved your issue?

If the problem persists, could you provide more details about your specific requirements? Sharing information such as the expected vs. actual results, any specific errors encountered, or situations where the formula fails would greatly help in diagnosing the issue more effectively.

LLGreen
Frequent Visitor

Corrected DAX formula. Sorry about that.

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