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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

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
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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