Forum Discussion
samcaicn
9 years agoFrequent Visitor
want sorting by Percentage
Data column”SEX“ is ”0“ and ”1“; Axis is ”REGION“, Value is ”SEX“ percentage; can't sorting by male(0) percentage, ps help,thanks
- 9 years ago
You can use the CALCULATE function to count filtered values.
Male %age = CALCULATE(Count([sex]),[sex] = "Male") / Count([sex])
v-huizhn-msft
9 years agoMicrosoft Employee
Hi samcaicn,
The MALE is a calculated column? The synax of COUNTROWS function is COUNTROWS(<table>). Why you use column rather than table? Why you use Could you please share the complete DAX and your sample data for further analysis? So we can post the solution which is close your requirement. It's hard to reproduce your scenario. Thanks for understanding.
Best Regards,
Angelia