Forum Discussion
sdhn
Responsive Resident
4 years agoChange to Number
Hi All,
I wrote some mesaures and displaying data in the percentage in the graph.
Here is the code in the measure
Not Applicable % = divide(countrows(filter('Department Application','Department Application'[Status of Stocks] = "NOT APPLICABLE" )), COUNTROWS('Department Application'))
Users wants in the numbers. I changed from Power Bi as.
But it showing value as 0 in the graph.
If I increase the number format change to decimal.
I want in number with corrcet values.
Help will be appreciated. Thanks
2 Replies
- AlexisOlson
Super User
If you want it to show the number equivalent of 9.5%, then you need to increase the number of decimal places to three so that it shows "0.095". If you want it to show "9.5", then multiply your measure by 100.
- VahidDM
Super User
Hi sdhn
If you want a number, try this:
Not Applicable % = Var _A = DIVIDE( COUNTROWS( FILTER( 'Department Application', 'Department Application'[Status of Stocks] = "NOT APPLICABLE" ) ), COUNTROWS( 'Department Application' ) ) Return _A*100If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
LinkedIn: www.linkedin.com/in/vahid-dm/