Qlik Community

Ask a Question

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
Become an analytics expert with Qlik's new 15 week course: Applied Data Analytics using Qlik Sense. READ MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Thomas94
Contributor II
Contributor II

Season year code?

Hi everyone,

 

I'm trying to combine the last 2 numbers from the year with the first character of the season.

For example: W19, S19

 

I'm usising following code:

='W'&max(right(num( Year(AddMonths(Today(),-1)) ),2))

This works, but when I create a variable of it, the result is "-".  Very strange because it's the same code as the expression.

My variable Seizoenscode :

='W'&max(right(num( Year(AddMonths(Today(),-1)) ),2))

The set analyses I want to use the variable: 

Seizoenscode={$(=$(vSeizoencodeCY))}

Anyone who knows how I can fix this?

thanks in advance

1 Solution

Accepted Solutions
vijetas42
Specialist
Specialist

try to add variable as 'W'&max(right(num( Year(AddMonths(Today(),-1)) ),2)) without '=' sign and then you can use as $(variable)

View solution in original post

2 Replies
vijetas42
Specialist
Specialist

try to add variable as 'W'&max(right(num( Year(AddMonths(Today(),-1)) ),2)) without '=' sign and then you can use as $(variable)

View solution in original post

Thomas94
Contributor II
Contributor II
Author

It worked! Thank you for your help