Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
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.