Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
upaliwije
Creator II
Creator II

% Calculation

Hi Friends

I have written following expression and bus It does not calculate the % correctly. Pls help me correct my expressionScreenshot_5.png

if(RENEWED_PREMIUM=0 or (RENEWED_REFUNDS*1)=RENEWED_PREMIUM,SUM( RENEWABLE_PREMIUM))

/if(RENEWED_PREMIUM=0 or (RENEWED_REFUNDS*1)=RENEWED_PREMIUM,SUM(TOTAL<REASON> RENEWABLE_PREMIUM))

1 Solution

Accepted Solutions
sunny_talwar

May be this

Sum(if(RENEWED_PREMIUM = 0 or (RENEWED_REFUNDS*1) = RENEWED_PREMIUM, RENEWABLE_PREMIUM))

/Sum(TOTAL<DEPT> if(RENEWED_PREMIUM = 0 or (RENEWED_REFUNDS*1) = RENEWED_PREMIUM, RENEWABLE_PREMIUM))

View solution in original post

8 Replies
sunny_talwar

What is wrong?

upaliwije
Creator II
Creator II
Author

% incorrectly shown totaling not adding upto 100%

sunny_talwar

Which ones? can you point out?

upaliwije
Creator II
Creator II
Author

Screenshot_5.png

Total Row Should be 100% and respective  % should be shown against each reason

sunny_talwar

May be you need this

if(RENEWED_PREMIUM=0 or (RENEWED_REFUNDS*1)=RENEWED_PREMIUM,SUM( RENEWABLE_PREMIUM))

/if(RENEWED_PREMIUM=0 or (RENEWED_REFUNDS*1)=RENEWED_PREMIUM,SUM(TOTAL<DEPT> RENEWABLE_PREMIUM))

upaliwije
Creator II
Creator II
Author

Thanks Sunny

It is till not working. This is what I want

Screenshot_5.png

sunny_talwar

May be this

Sum(if(RENEWED_PREMIUM = 0 or (RENEWED_REFUNDS*1) = RENEWED_PREMIUM, RENEWABLE_PREMIUM))

/Sum(TOTAL<DEPT> if(RENEWED_PREMIUM = 0 or (RENEWED_REFUNDS*1) = RENEWED_PREMIUM, RENEWABLE_PREMIUM))

upaliwije
Creator II
Creator II
Author

Thanks Sunny

This is exactly what I want