7 Replies Latest reply: Sep 18, 2013 8:26 AM by Sverre Ardø

Trouble with digits/format

The format is showing a column that I don't want and that column appeared after I inserted this code in the pivot table.

=Sum(Bokførtverdi)&'     '&(Sum(Bokførtverdi)/sum(Total(Bokførtverdi))*100 &' %')

It would also be nice to limit the number of digits on the percentage to two, is there some kind of round function that is available?

• Re: Trouble with digits/format

=Sum(Bokførtverdi)&'                 '&Round(Sum(Bokførtverdi)/sum(Total(Bokførtverdi))*100,0.01) &' %'

This did the trick, however there is perhaps a more elegant way of inserting a line shift...

• Re: Trouble with digits/format

Set the expression number format (object properties, number tab) to expression default and use the next:

=

Num(Sum(Bokførtverdi),'#,##0')

& chr(10) &

Num(Sum(Bokførtverdi)/sum(Total(Bokførtverdi),'#,##0.00%')

• Re: Trouble with digits/format

This shows only the absolute nimbers not the percentage

• Re: Trouble with digits/format

Another way of achieving this would be to make some changes to the format of the expression in the number tab.

Set the expression to fixed to 2 numbers and use the checkbox show in percent(%).

You can also force the format by changing the code to:

Num(Sum(Bokførtverdi)&'     '&(Sum(Bokførtverdi)/sum(Total(Bokførtverdi)), '#.##0,00%')

• Re: Trouble with digits/format

Hi Sverre,

I believe expression below should work in your case

 =Sum(Bokførtverdi)&' '& Num(Sum(Bokførtverdi)/sum(Total Bokførtverdi),'#,##0.00%')

Regards,

Sokkorn

• Re: Trouble with digits/format

No but

=Sum(Bokførtverdi)&'                 '&Num(Sum(Bokførtverdi)/sum(Total Bokførtverdi),'#,##%')