Qlik Community

Qlik Sense App Development

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

Announcements
BI & Data Trends 2021. Discover the top 10 trends emerging in today. Join us on Dec. 8th REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
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
Highlighted
Master
Master

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

Please try:

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

Highlighted
Contributor III
Contributor III

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

 

 
Highlighted
Master
Master

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

Please see attached.

Highlighted
Master
Master

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

What is your expression for Actual 2018 and Actual 2019?

Highlighted
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.

 

Highlighted

Can you try without TOTAL?

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