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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Trebor84
Helper II
Helper II

DISTINCTCOUNT to ignore filters

Hi, I have the following measure to count unique values but I need the measure to ignore any other filters on my visual.

 

= DISTINCTCOUNT(ResellerSales[SalesOrderNumber])

 

I have tried to include the ALL function which partly works but every single row in my matrix has the same total count.

 

While I need it to ignore filters, I need it to still show the row context as each row in my table has an account number: = (ResellerSales[AccNo])

 

Thanks

1 ACCEPTED SOLUTION
DaleH
Resolver I
Resolver I

The question context is vague, but, try something like this:

 

Result = 

CALCULATE(

     DISTINCTCOUNT(ResellerSales[SalesOrderNumber]),

     KEEPFILTERS( 'filter to keep' ),

     REMOVEFILTERS( 'filters to remove' )

)

View solution in original post

2 REPLIES 2
Ashish_Mathur
Super User
Super User

The ALL() function should work.  I can offer more help if you share the download link of your PBI file and show the expected result. 


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
DaleH
Resolver I
Resolver I

The question context is vague, but, try something like this:

 

Result = 

CALCULATE(

     DISTINCTCOUNT(ResellerSales[SalesOrderNumber]),

     KEEPFILTERS( 'filter to keep' ),

     REMOVEFILTERS( 'filters to remove' )

)

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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