cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Trebor84
Frequent Visitor

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
Helper I
Helper 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 III
Super User III

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
Helper I
Helper 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

Helpful resources

Announcements
PBI User Groups

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group!

MBAS on Demand

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

July 2021 Update 768x460.png

Check it out!

Click here to read more about the July 2021 Updates

Power Query PA Forum 768x460.png

Check it out!

Did you know that you can visit the Power Query Forum in Power BI and now Power Apps

Top Solution Authors
Top Kudoed Authors