Qlik Community

QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

Announcements
If you are a Qlik Insight Bot user, join this collaborative group: JOIN GROUP
Highlighted
Valued Contributor II

Show Expression as Percentage

Hi,

I have a pie chart and I want to format the value in the expression as Percentage of total Values.

Anyway I can do that inside of the expression script?

Thxs,

Alec,

1 Solution

Accepted Solutions
Highlighted
Esteemed Contributor III

Re: Show Expression as Percentage

In this case, try:

num(sum(Value)/sum(total Value), '#,##0%')

View solution in original post

8 Replies
Highlighted
Valued Contributor III

Re: Show Expression as Percentage

Just check the 'Relative' checkbox and percentages will be displayed.

Highlighted
Valued Contributor II

Re: Show Expression as Percentage

I cannot use this option as I have a toggle to chnage the expression by user.

The only way I can do is by setting that on the script expression but I don't know how to do that.

Thxs,

Highlighted
Esteemed Contributor III

Re: Show Expression as Percentage

In this case, try:

num(sum(Value)/sum(total Value), '#,##0%')

View solution in original post

Highlighted
Valued Contributor II

Re: Show Expression as Percentage

Hi,

Thanks for the replay .

Logic is correct but the field Value and Total Value are the same field.

I tried:

Num(Sum([Sales])/Sum({1}[Sales]), '#,##0%')

But I got 100% on on all values.

Thxs,

Highlighted
Not applicable

Re: Show Expression as Percentage

Hi,

Michael's expression should work.sum(total sales) forces the sum over all products whereas sum(sales) only computes sales for a particular product.

Regards,

Xue Bin

Highlighted
Not applicable

Re: Show Expression as Percentage

Hi,

Michael's expression should work.sum(total sales) forces the sum over all products whereas sum(sales) only computes sales for a particular product.

Regards,

Xue Bin

Highlighted
Valued Contributor II

Re: Show Expression as Percentage

Thank you guys.

Somehow it wasn't workking yesterday. I t is working as wanted.

Regards,

Alec

Highlighted
Contributor

Re: Show Expression as Percentage

Same here, 

 

 

any idea why this is happening?