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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
Zaky
Helper IV
Helper IV

How to change decimal places?

Hi,

 

I've created table performance (%).

Can anyone help me how to change decimal places up 2 decimal places only ?

and the measure that i used is > Response Performance percentage = ('Incident Raw Data (SLA Response'[Response Met]/'Incident Raw Data (SLA Response'[Response Total]*100) & "%".

But if i take out & "%", the decimal places is change as per what i want, without "%" sign.

 

Appreciate if anyone can help me resolve this

 

Many Thanks

 

percentage.PNG

1 ACCEPTED SOLUTION
OwenAuger
Super User
Super User

Hi @Zaky

Currently your measure is returning a text value.

 

I would recommend that you adjust the measure so that it returns a number rather than text, and change its number format to percentage with two decimal places.

 

  1. Rewrite your measure as follows:
    Response Performance percentage =
    [Response Met] / [Response Total]
    Note that I have removed the table names you had in front of the measures [Response Met] and [Response Total] as it is considered best practice to refer to measures without table names (to distinguish them from column references).

  2. Select the Response Performance percentage measure in the field list, then on the ribbon Modelling tab, in the formatting section, choose Format: Percentage and 2 decimal places. You can also do this in the new Modelling view.
  3. Now the measure should be formatted correctly wherever it is displayed, and since it is now a number it can be used in any visual expecting a number and will be sortable.

 

Regards,

Owen


Owen Auger
Did I answer your question? Mark my post as a solution!
Blog
Twitter
LinkedIn

View solution in original post

2 REPLIES 2
OwenAuger
Super User
Super User

Hi @Zaky

Currently your measure is returning a text value.

 

I would recommend that you adjust the measure so that it returns a number rather than text, and change its number format to percentage with two decimal places.

 

  1. Rewrite your measure as follows:
    Response Performance percentage =
    [Response Met] / [Response Total]
    Note that I have removed the table names you had in front of the measures [Response Met] and [Response Total] as it is considered best practice to refer to measures without table names (to distinguish them from column references).

  2. Select the Response Performance percentage measure in the field list, then on the ribbon Modelling tab, in the formatting section, choose Format: Percentage and 2 decimal places. You can also do this in the new Modelling view.
  3. Now the measure should be formatted correctly wherever it is displayed, and since it is now a number it can be used in any visual expecting a number and will be sortable.

 

Regards,

Owen


Owen Auger
Did I answer your question? Mark my post as a solution!
Blog
Twitter
LinkedIn

Hi Owen,

 

Yes!, It's working.Finally i can change it accordingly. Smiley Very Happy

Thank you very much sir.

 

 

Regards

Zaky

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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