Skip to main content
Announcements
Live today at 11 AM ET. Get your questions about Qlik Connect answered, or just listen in. SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
scotly-victor
Creator II
Creator II

% in expression

Hi Everyone,

I have set up  toggle for refund value and refund percentage for KPI Object .

If I select refund value the  KPI should show value and

If I select refund percentage the KPI should show % .


I have set up number formatting as auto .

I had used num(,'##.##%'

).

It doesn't work

Any help please?


7 Replies
sunny_talwar

May be try like this:

If(showvalie, Num(Sum({<Flag = P{Refund}>} Sales), '#,##0.00', Num(Sum({<Flag = P{Refund}>} Sales)/Sum/(Sales), '#,##0.00%')

I made up the expression, replace the above with your actual expressions

scotly-victor
Creator II
Creator II
Author

This is my expression

It did not work

if(%Perval='value',

num(((SUM({<type={'order'},$(vPeriod)>} [selling fees])+

SUM({<type={'order'},$(vPeriod)>}[fba fees] )+

SUM({<type={'order'},$(vPeriod)>} [other transaction fees] )

+ SUM({<type={'order'},$(vPeriod)>}other))*-1)/100000,'#0.00')

,

num((((SUM({<type={'order'},$(vPeriod)>} [selling fees])+SUM({<type={'order'},$(vPeriod)>}[fba fees] )+SUM({<type={'order'},$(vPeriod)>} [other transaction fees] )

+ SUM({<type={'order'},$(vPeriod)>}other))*-1)/sum({<type={'order'},$(vPeriod)>}[Net Sales])),'#0.00%')

)

CELAMBARASAN
Partner - Champion
Partner - Champion

What do you meant by Refund Percentage here?

Percentage of the amount refunded to the concern Org/Person from the Bill/Invoice amount?

if so you could have to try

Num(Refund Value/Invoice Amount,'##.##%')

% in number format, will just multiply the value with 100 and adds '%' symbol at the end

sunny_talwar

May be because of missing parenthesis at the very end?

If(%Perval = 'value',

Num(

(

(Sum({<type={'order'},$(vPeriod)>} [selling fees]) +

Sum({<type={'order'},$(vPeriod)>} [fba fees])+

Sum({<type={'order'},$(vPeriod)>} [other transaction fees])+

Sum({<type={'order'},$(vPeriod)>} other))*-1)/100000,'#0.00')

,

Num((((SUM({<type={'order'},$(vPeriod)>} [selling fees])+SUM({<type={'order'},$(vPeriod)>}[fba fees] )+SUM({<type={'order'},$(vPeriod)>} [other transaction fees] )

+ SUM({<type={'order'},$(vPeriod)>}other))*-1)/sum({<type={'order'},$(vPeriod)>}[Net Sales])),'#0.00%'))

)

scotly-victor
Creator II
Creator II
Author

Sorry,

Commission percentage

CELAMBARASAN
Partner - Champion
Partner - Champion

not worked - Are you getting null value?

Are you getting value for refund expression?

Check the value returned by below expression is correct

sum({<type={'order'},$(vPeriod)>}[Net Sales])

scotly-victor
Creator II
Creator II
Author

Sorry sunny,

still same