Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
aarnkalle
Contributor III
Contributor III

Need your help to get a percentage (Current Year Total / Previous Year Total)

Hi

I need your help to get a percentage (Current Year Total / Previous Year Total) on a row in Qliksense Pivot.

Sum (Total Distinct {<ActPhysician, Record1>} (CY_Gross)) / Sum (Total Distinct {<ActPhysician, Record1>} (PY_Gross))

13 Replies
Taoufiq_Zarra

Hi,

you can use :

for the current year

=Sum ( {<Year = {"$(=Max(Year))"}>} total   YOURINDICATOR)

 

Previous year

=Sum ( {<Year = {"$(=Max(Year)-1)"}>} total   YOURINDICATOR)

 

cheers,

Regards,
Taoufiq ZARRA

"Please LIKE posts and "Accept as Solution" if the provided solution is helpful "

(you can mark up to 3 "solutions") 😉
anushree1
Specialist II
Specialist II

Please try:

num(Sum (Total Distinct {<ActPhysician, Record1>} (CY_Gross)) / Sum (Total Distinct {<ActPhysician, Record1>} (PY_Gross)),'##.##%')

aarnkalle
Contributor III
Contributor III
Author

Thanks for your response. However it is not showing expected results.

 

 
Taoufiq_Zarra

sorry but, I can't see the problem.

can you share an extract from your data sets? and the requested outpout !

Regards,
Taoufiq ZARRA

"Please LIKE posts and "Accept as Solution" if the provided solution is helpful "

(you can mark up to 3 "solutions") 😉
aarnkalle
Contributor III
Contributor III
Author

Please see attached.

Taoufiq_Zarra

what is the formula used for[Actual 2018] and[Actual 2019]?

Regards,
Taoufiq ZARRA

"Please LIKE posts and "Accept as Solution" if the provided solution is helpful "

(you can mark up to 3 "solutions") 😉
sunny_talwar

What is your expression for Actual 2018 and Actual 2019?

aarnkalle
Contributor III
Contributor III
Author

Sum (Total Distinct {<ActPhysician, Record1>} (CY_Gross)) / Sum (Total Distinct {<ActPhysician, Record1>} (PY_Gross))

"Record1" having filter for Actual 2018 and Actual 2019 data.

"CY_Gross" is the value for Actual 2019 and "PY_Gross" is the value for Actual 2018.

 

sunny_talwar

Can you try without TOTAL?

Sum(DISTINCT {<ActPhysician, Record1>} CY_Gross)
/
Sum(DISTINCT {<ActPhysician, Record1>} PY_Gross)