Qlik Community

Ask a Question

Qlik Sense App Development

Discussion board where members can learn more about Qlik Sense App Development and Usage.

Announcements
Talk to Experts Tuesday, January 26th at 10AM EST: Qlik Sense. REGISTER NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
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
Master II
Master II

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") 😉
Specialist II
Specialist II

Please try:

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

Contributor III
Contributor III

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

 

 
Master II
Master II

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") 😉
Contributor III
Contributor III

Please see attached.

Master II
Master II

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") 😉

What is your expression for Actual 2018 and Actual 2019?

Contributor III
Contributor III

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.

 

Can you try without TOTAL?

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