Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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?
=NUM(Sum(Bokførtverdi),'########### ###')& ' '&Round(Sum(Bokførtverdi)/sum(Total(Bokførtverdi))*100,0.01) &' %'
=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...
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%')
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%')
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
This shows only the absolute nimbers not the percentage
No but
=Sum(Bokførtverdi)&' '&Num(Sum(Bokførtverdi)/sum(Total Bokførtverdi),'#,##%')
Gives me about the same as I already had.
=NUM(Sum(Bokførtverdi),'########### ###')& ' '&Round(Sum(Bokførtverdi)/sum(Total(Bokførtverdi))*100,0.01) &' %'