Skip to main content
Announcements
Qlik Connect 2025: 3 days of full immersion in data, analytics, and AI. May 13-15 | Orlando, FL: Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
qlikviewaf
Creator
Creator

Formula Syntax

Hi,

i'm using this expression, that is defining the Year_Surgery as follow:

I would like to modify this in order to retrieve the Year_Surgery as the selection done on the field Year, minus one year, in order to get the previous year. so if i select 2017, the year surgery needs to be 2016.

Anyone knows how to adjust the syntax?

Thanks

Year_Surgery={$(=concat(chr(39) & Year & chr(39),',') )

14 Replies
qlikviewaf
Creator
Creator
Author

amount of 01/01/2016 should be 1100 , so basically the sum of the 3 lines abow.

IN your example is not 1100

Catturadsaffdasfa.PNG

tresesco
MVP
MVP

In your data for NickRep there are 3 amounts (all 100). See the frequency of the values in the screenshot. Hence you get the sum as 1300 instead of 1100. Capture.JPG

qlikviewaf
Creator
Creator
Author

that formula is build to select Year= 2017 and Month = Janauary, but get on the graph all the sales where Year_Surgery= 2016 and Month_Surgery= January regardless what is selected in terms of month/year.

So i expected for Year=2017 and Month=January, the sum of all surgery falling in 2016 , january.

Make sense?

tresesco
MVP
MVP

In the screenshot above, all the data (1300) fall under surgery date 2017, Jan. I am sorry, I guess I could not follow.

qlikviewaf
Creator
Creator
Author

Sorry i was looking the table which is wrong

it works, thank you!