2 Replies Latest reply: Oct 17, 2018 9:52 AM by Jing Xin

# I have a question about calculation for percentage of the column total

I am converting a dashboard from excel to Qlik. there is a calculation of field/column total in excel, I can't convert this to Qlik.

I have 3 years of the data 2017,2017 and 2018. data will be compared by year. see code below. the percentage should base on one year only. when I do below, the demonitor is the 3 year total if 3 year all selected by user.

what I need is no matter what is selected, the demonitor should always be the total for that one year only.

can anyone show me how to resolved this issue?

I used below um(DM_TotalWeight)/Sum({\$<[DRG # &Desc],Cohort_Category,[DRGs for Exclusion (Trachs)],ServiceLine,MedSurg>} total DM_TotalWeight)

• ###### Re: I have a question about calculation for percentage of the column total

Hi Jing,

If you are trying to ignore selections in set analysis on the denominator then it should be:

Sum({\$<[DRG # &Desc]=,Cohort_Category=,[DRGs for Exclusion (Trachs)]=,ServiceLine=,MedSurg=>} total DM_TotalWeight)

Regards,
Arjun

• ###### Re: I have a question about calculation for percentage of the column total

Arjun,

thank you so much for your reply. it did not work. the issue is the denoimator is the sum of 2016,2017 and 2018

but what I want is is 2016m2017 and 2018 selected. the denominator will be

for 2016- sum of 2016

2017 -sum of 2017

2018- sum of 2018

my formular is total claim on line item/total claim on total column.

total claim on total column is the denominator and it should be the total of one year /that year only. not the sum of the 3 years.

I really have no idea how to fix this.