A COUNTIF is sorely missed in DAX. (The workaround with CALCULATE and FILTER is too cumbersome and complex for most users)
4 Comments
- jason_wonglyNew MemberYou can use COUNTX instead. Btw, CALCULATE and FILTER are most-learn functions in POWER BI, do encourage the users to learn them.
- fbcideas_migusrNew MemberOne of the beauties of DAX over Excel is that filtration (the "IF" or "IFS" step) is separated from the aggregation step (count, sum, average, minimum, etc.). Instead of introducing a new "IF" or "IFS" function for each type of aggregation (SUMIFS, MINIFS, etc.), you filter your data with FILTER and you use your normal aggregation function on that filtered table. In DAX, the equivalent of COUNTIF would be this: COUNTROWS(FILTER('Table',
)) What is the workaround with CALCULATE and FILTER that you had in mind? - nishalitNew Member
You can leverage COUNTX for this. https://docs.microsoft.com/en-us/dax/countx-function-dax
- fbcideas_migusrNew MemberStatus added:Completed
Recent ideas
Dynamic current-period defaults for separate Year and Month slicers
Scenario The target scenario is a report viewed in Power BI Service, using a DirectQuery semantic model and a dedicated Date dimension. Separate Year and Month slicers are part of the required user ...vvargasv2 days agoMicrosoft EmployeeNew13Views0likes0CommentsAbout "Download SQL database project" and fix the downloaded project
1. The sqlproj must be fixed, it is downloaded without the xml markup line <?xml version="1.0" encoding="utf-8"> 2. The sdk must be updated: Actual: <Sdk Name="Microsoft.Build.Sql" Version="0.1...Jarrinf2 days agoFrequent VisitorNew75Views3likes3CommentsAdd REST API to Take Ownership of Fabric Pipelines
When using service account to automatically deploy Fabric pipelines from Dev workspace to upper environments, the owner of pipelines in target envionment remain unchanged. In some situations, per...VickyPeng2 days agoRegular VisitorNew368Views5likes2Comments