Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
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
PrashantSangle

Hi,

Try like

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

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 🙂
jonathandienst
Partner - Champion III
Partner - Champion III

Hi

Not sure what you are trying to achieve, but you are missing an aggregation function (Min, Mx, Sum, Count etc) here:

                              V

Sum(ACTUAL) /   ({$<YEAR = {$(....


HTH

Jonathan

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
upaliwije
Creator II
Creator II
Author

Not working please

upaliwije
Creator II
Creator II
Author

What I am Trying to achieve is to calculate a ratio where $(vActual) is variable. That variable I want to apply to a particular that is selected by user

PrashantSangle

Hi,

my bad

try this,

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

or

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

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 🙂
jonathandienst
Partner - Champion III
Partner - Champion III

Have you tried this?

Sum(ACTUAL) / vActual * 100



Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
upaliwije
Creator II
Creator II
Author

That is working. But I want to specify Selected year and and in another expression Year-1

upaliwije
Creator II
Creator II
Author

Still not working

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

its_anandrjs

Then please use GetfieldSelections() function with field name will help you better.