Forum Discussion
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
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.
- 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). - 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.
- 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
- Rewrite your measure as follows:
2 Replies
- OwenAuger
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.
- 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). - 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.
- 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
- Zaky
Helper IV
Hi Owen,
Yes!, It's working.Finally i can change it accordingly. :smileyvery-happy:
Thank you very much sir.
Regards
Zaky
- Rewrite your measure as follows: