Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

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?

1 Solution

Accepted Solutions
Not applicable
Author

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

View solution in original post

7 Replies
Not applicable
Author

=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...

Not applicable
Author

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%')

Carlos_Reyes
Partner - Specialist
Partner - Specialist

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%')

Sokkorn
Master
Master

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

Not applicable
Author

This shows only the absolute nimbers not the percentage

Not applicable
Author

No but

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

Gives me about the same as I already had.

Not applicable
Author

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