Forum Discussion
Anonymous
7 years agoNot applicable
Countx with some conditions
Hello!! Im trying to do this in a calculated column in dax, im not sure where is the mistake. I have a table with information like this: I want to count by country, supplier and mat_grou...
- 7 years ago
Anonymous Please try below using "New Column"
ActualCount = CALCULATE(COUNTROWS(MatGroups),ALLEXCEPT(MatGroups,MatGroups[Country],MatGroups[Supplier]))
ExpectCount = CALCULATE(DISTINCTCOUNT(MatGroups[MatGroup]),ALLEXCEPT(MatGroups,MatGroups[Country],MatGroups[Supplier]))
Note - You can solve the same in "Power Query" as well using "GROUP BY" option..
Hope this helps !!
PattemManohar
7 years agoCommunity Champion
Anonymous Please try below using "New Column"
ActualCount = CALCULATE(COUNTROWS(MatGroups),ALLEXCEPT(MatGroups,MatGroups[Country],MatGroups[Supplier]))
ExpectCount = CALCULATE(DISTINCTCOUNT(MatGroups[MatGroup]),ALLEXCEPT(MatGroups,MatGroups[Country],MatGroups[Supplier]))
Note - You can solve the same in "Power Query" as well using "GROUP BY" option..
Hope this helps !!
Anonymous
7 years agoNot applicable