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

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
sunitha_chellaiah
Partner - Creator
Partner - Creator

Divide aggregation expression with total value

Hi, 

Please see below screenshot. I want to create a new percentage column.

I want to divide each row value with the total value. for eg. 0.14/2.73 = 5.12%

I am using below mentioned expression to calculate Discount in R.S

sum(aggr((sum(DISTINCT D.BILLED_MAKING_CHARGES)-sum(DISTINCT D.MAKING_SP)),D.VOUCHER_NO,D.LABEL_NO))

Please help me with the expression to calculate percentage.

sunitha_chellaiah_0-1616666338544.png

Thanks

@sunny_talwar : Please help

1 Solution

Accepted Solutions
yassinemhadhbi
Creator II
Creator II

have you tried

sum(total aggr((sum(DISTINCT D.BILLED_MAKING_CHARGES)-sum(DISTINCT D.MAKING_SP)),D.VOUCHER_NO,D.LABEL_NO))

Best Regards
Yassine Mhadhbi

View solution in original post

2 Replies
yassinemhadhbi
Creator II
Creator II

have you tried

sum(total aggr((sum(DISTINCT D.BILLED_MAKING_CHARGES)-sum(DISTINCT D.MAKING_SP)),D.VOUCHER_NO,D.LABEL_NO))

Best Regards
Yassine Mhadhbi
sunitha_chellaiah
Partner - Creator
Partner - Creator
Author

Thank you so much.  It's working.