Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Connect 2026! Turn data into bold moves, April 13 -15: Learn More!
cancel
Showing results for 
Search instead for 
Did you mean: 
upaliwije
Creator II
Creator II

Expression

Sum(ACTUAL)/({$<YEAR = {$(=Max(YEAR))}>}$(=$(=vActual))*100)

The above expression is not working. Pls help me to correct it

16 Replies
upaliwije
Creator II
Creator II
Author

Sorry

I have no idea about that function. Pls show an example

PrashantSangle

Hi,

If possible upload sample apps.

Regards

Great dreamer's dreams never fulfilled, they are always transcended.
Please appreciate our Qlik community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂
Not applicable

Try this

Sum(ACTUAL)/sum({$<YEAR = {$(=Max(YEAR))}>} vActual*100)

jagan
Partner - Champion III
Partner - Champion III

Hi,

For selected Year use this variable

vActual  = sum({$<DESCRIPTION={'GROSS_PREMIUM'}>}ACTUAL)

For previous Year use this variable

vActualPreviousYear = sum({$<Year={$(=Max(Year) - 1)}, DESCRIPTION={'GROSS_PREMIUM'}>}ACTUAL)

Hope this helps you.

Regards,

Jagan.



jagan
Partner - Champion III
Partner - Champion III

Hi,

If you want the apply the same for Sum(ACTUAL) then use below


Sum(ACTUAL) / sum({$<DESCRIPTION={'GROSS_PREMIUM'}>}ACTUAL)

For previous Year use this

Sum({$<Year={$(=Max(Year) - 1)}>}ACTUAL) / sum({$<Year={$(=Max(Year) - 1)}, DESCRIPTION={'GROSS_PREMIUM'}>}ACTUAL)

Hope this helps you.

Regards,

Jagan.

upaliwije
Creator II
Creator II
Author

Thanks Jagan

It is ok. Cant I keep the variable as it is edit the expression to suit the year

jagan
Partner - Champion III
Partner - Champion III

Hi,

If you are selecting year by default then this will give you the selected year value.

Sum(ACTUAL) / sum({$<DESCRIPTION={'GROSS_PREMIUM'}>}ACTUAL)


If you are not selecting the year and you want the latest year then use below expression


Sum(ACTUAL) / sum({$<DESCRIPTION={'GROSS_PREMIUM'}, Year={$(=Max(Year) - 1)}>}ACTUAL)


Hope this helps you.


Regards,

jagan.