Forum Discussion
sqldev2017
7 years agoMicrosoft Employee
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,
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))
3 Replies
- LivioLanzoSolution Sage
- sqldev2017Microsoft Employee
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))
- PattemManoharCommunity Champion
sqldev2017 Please post the sample data in copiable format, which will be helpful to suggest any accurate solution.