cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Helper I
Helper I

Get Count based on condition or filter

I have a calculared measure - say  "Revenue".

 

I have a dimension called Accounts, which contains Unique AccountID.

 

The "Revenue" measure relates to the Accounts - Revenue for an account / Quarter/ Region.

 

I want to create a new Column using DAX ,  which returns DISTINCT Count of all Accounts  where "Revenue" > 500000 

 

Bear in mind that , this "Revenue" , is a calculated Measure.

 

Thank You,

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Helper I
Helper I

Re: Get Count based on condition or filter

 Thank you for your replies.

 

I think I found the solution in a different POWERBI thread - 

 

CALCULATE(DISTINCTCOUNT(Sales[Sales_ID]),FILTER(VALUES(Sales[Sales_ID]),[YTDSales]>3000))

View solution in original post

3 REPLIES 3
Highlighted
Solution Sage
Solution Sage

Re: Get Count based on condition or filter

Hi @sqldev2017

 

are you able to post a sample of your data?

 

thx

 


 


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


Proud to be a Datanaut!  

Highlighted
Super User I
Super User I

Re: Get Count based on condition or filter

@sqldev2017 Please post the sample data in copiable format, which will be helpful to suggest any accurate solution.





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

Proud to be a Super User!




Highlighted
Helper I
Helper I

Re: Get Count based on condition or filter

 Thank you for your replies.

 

I think I found the solution in a different POWERBI thread - 

 

CALCULATE(DISTINCTCOUNT(Sales[Sales_ID]),FILTER(VALUES(Sales[Sales_ID]),[YTDSales]>3000))

View solution in original post

Helpful resources

Announcements
August 2020 Community Challenge: Can You Solve These?

August 2020 Community Challenge: Can You Solve These?

We're excited to announce our first cross-community 'Can You Solve These?' challenge!

Community Blog

Community Blog

Visit our Community Blog for articles, guides, and information created by fellow community members.

Community Summit Australia – Join Online!

Community Summit Australia – Join Online!

Be a part of the leading Microsoft Business Applications digital event, curated for the APAC community.

Top Solution Authors
Top Kudoed Authors