Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Get certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. Register now

Reply
sdhn
Responsive Resident
Responsive Resident

Change 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'))

 

sdhn_0-1640623846756.png

sdhn_3-1640624133959.png

 

 

Users wants in the numbers. I changed from Power Bi as.

sdhn_1-1640623926373.png

But it showing value as 0 in the graph.

 

sdhn_4-1640624177700.png

 

 

If I increase the number format change to decimal.

 

sdhn_2-1640624039111.png

sdhn_5-1640624222069.png

 

 

I want in number with corrcet values.

 

Help will be appreciated.  Thanks 

 

 

 

2 REPLIES 2
VahidDM
Super User
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*100

 

If 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/

 

 

AlexisOlson
Super User
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.

Helpful resources

Announcements
November Carousel

Fabric Community Update - November 2024

Find out what's new and trending in the Fabric Community.

Live Sessions with Fabric DB

Be one of the first to start using Fabric Databases

Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.

Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early Bird pricing ends December 9th.

Nov PBI Update Carousel

Power BI Monthly Update - November 2024

Check out the November 2024 Power BI update to learn about new features.