Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

alexbg1997
New Contributor III

How to display expression in Text object as percentage?

I have a set analysis expression that I need to display as a percentage, can anyone help?

Expression: = (count({$<[Performance (Requested Date)] = {'Early' , 'On Time'}>}[Delivered Quantity]))/(count({$<[Performance (Requested Date)] = {'Early' , 'On Time', 'Late','Undelivered Late' }>}[Delivered Quantity]))

This expression is used as 'Text in chart' on a gauge chart FYI.

Thank you

1 Solution

Accepted Solutions

Re: How to display expression in Text object as percentage?

How about this

Num(Count({$<[Performance (Requested Date)] = {'Early' , 'On Time'}>} [Delivered Quantity])/Count({$<[Performance (Requested Date)] = {'Early' , 'On Time', 'Late','Undelivered Late'}>} [Delivered Quantity]), '#0.0%')

9 Replies
shiveshsingh
Honored Contributor

Re: How to display expression in Text object as percentage?

May be like this

Num( count({$<[Performance (Requested Date)] = {'Early' , 'On Time'}>}[Delivered Quantity]))/(count({$<[Performance (Requested Date)] = {'Early' , 'On Time', 'Late','Undelivered Late' }>}[Delivered Quantity]), '#,##0%')

Highlighted
alexbg1997
New Contributor III

Re: How to display expression in Text object as percentage?

Did not work unfortunately

jyothish8807
Honored Contributor II

Re: How to display expression in Text object as percentage?

Try Like this:

num(

(count({$<[Performance (Requested Date)] = {'Early' , 'On Time'}>}[Delivered Quantity]))/(count({$<[Performance (Requested Date)] = {'Early' , 'On Time', 'Late','Undelivered Late' }>}[Delivered Quantity])) 

/

(count({1<[Performance (Requested Date)] = {'Early' , 'On Time'}>}[Delivered Quantity]))/(count({$<[Performance (Requested Date)] = {'Early' , 'On Time', 'Late','Undelivered Late' }>}total [Delivered Quantity])),'##.0%')

Best Regards,
KC
alexbg1997
New Contributor III

Re: How to display expression in Text object as percentage?

Hi Jyothish,

Thank you the expression has been accepted as suitable however the percetnage value shown is different to the one shown from the original expression shown in my first post.

Any ideas?

yogesharekar
New Contributor III

Re: How to display expression in Text object as percentage?

Hi Alexander,

Try this,

=Num(((count({$<[Performance (Requested Date)] = {'Early' , 'On Time'}>}[Delivered Quantity]))/

(count({$<[Performance (Requested Date)] = {'Early' , 'On Time', 'Late','Undelivered Late' }>}[Delivered Quantity]))),'##0.00%')

hopefully this will work.

Re: How to display expression in Text object as percentage?

How about this

Num(Count({$<[Performance (Requested Date)] = {'Early' , 'On Time'}>} [Delivered Quantity])/Count({$<[Performance (Requested Date)] = {'Early' , 'On Time', 'Late','Undelivered Late'}>} [Delivered Quantity]), '#0.0%')

alexbg1997
New Contributor III

Re: How to display expression in Text object as percentage?

Thank you Sunny and everyone else this has worked

Cheers,

Alex.

shiveshsingh
Honored Contributor

Re: How to display expression in Text object as percentage?

Missed the formatting

Thanks buddy

jyothish8807
Honored Contributor II

Re: How to display expression in Text object as percentage?

It was my mistake, i did not say the "/" in your expression and thought this as a complete one count. So i divided the same expression with the total

Br,

KC

Best Regards,
KC