Forum Discussion
Decimals not formatting on chart
Paginated Report question. I am creating a calculated field and need to format it to display on a line chart based on a description; i.e, if description is 'Percentage 1 decimal' then format it with one decimal place; if it is 'Percentage 2 decimal' then format it with 2, etc. It works fine except if the value is a whole number, the value on the chart displays as whole number/integer. Example, if result is 5.00 it displays as 5 on the chart instead of 5.00. A snippet of the calculated field is the following:
IIF(Fields!Data_Format="1 decimal",format(Fields!Result.Value, "0.0"),IIF(Fields!Data_Format="2 decimal",format(Fields!Result.Value, "0.00"), etc.....How do I get the trailing zeroes to appear in instances when it's a whole number?
3 Replies
- AnonymousNot applicable
Hi ldwf ,
Please add the following formula in the expression and check if it can return the expected result...
IIF(InStr(Fields!Result.Value,".00") > 0,Fields!Result.Value)Expression examples in Power BI Report Builder
Best Regards
- ldwf
Helper V
Anonymous . Thanks but that doesn't make a difference. I even tried multiplying the value by 1.00 as well as tried adding 0.00 to it, but the zeroes still get dropped.
- ldwf
Helper V
Thanks but that doesn't make a difference. I even tried multiplying the value by 1.00 as well as tried adding 0.00 to the value, but it still drops the zeroes.