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

Announcements
See why IDC MarketScape names Qlik a 2025 Leader! Read more
cancel
Showing results for 
Search instead for 
Did you mean: 
upaliwije
Creator II
Creator II

Expression for Ratio

Hi Friends

I have follwing pivot tbale in my QV doc

Screenshot_1.png

and I want to show Ratio of each item under DES coloum against Gross Premium. I have written the follwing  expression. but It does not show expected valures in Ratio column. Kindly help me to correct my expression.

=fabs(Sum(PL)/sum({<DES={'GROSS_PREMIUM'}>}PL))*100

1 Solution

Accepted Solutions
sunny_talwar

Try this

=fabs(Sum(PL)/sum(TOTAL <FROM_YEAR> {<DES={'GROSS_PREMIUM'}>}PL))*100

View solution in original post

5 Replies
chinnuchinni
Creator III
Creator III

can you attach the sample app. then it will easy to reach the requirement.

upaliwije
Creator II
Creator II
Author

iT is difficult to share sample data

sunny_talwar

Try this

=fabs(Sum(PL)/sum(TOTAL <FROM_YEAR> {<DES={'GROSS_PREMIUM'}>}PL))*100

PrashantSangle

what is your expected output??

also explain your formula in simple word.

Regards

Great dreamer's dreams never fulfilled, they are always transcended.
Please appreciate our Qlik community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂
upaliwije
Creator II
Creator II
Author

Thanks Sunny!

That is exactly what I wanted. You are precise as usual