Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
janus2021
Contributor III
Contributor III

return value from function Month(Today())

Hi.
I do not know if the problem I am getting is due to some attitude in our environment or if I 
wrote something wrong in the code. What is seen in the image is: kolumn_vs_Qlik.png
Month which is a field in a column and must be matched against the function that is to pick up the current month.
However, it gives no result due to the month from the function being apr. The whole expression looks like this: sum( { 1<Month={"$(=Month(Today()) )"} > } LineSalesAmount)

Asks the question here so maybe someone can give tips what is wrong.

Regards.
1 Solution

Accepted Solutions
jwjackso
Specialist III
Specialist III

In your load script, are the MonthNames in lowercase?

 

SET MonthNames='Jan;Feb;Mar;Apr;May;Jun;Jul;Aug;Sep;Oct;Nov;Dec';

View solution in original post

4 Replies
jwjackso
Specialist III
Specialist III

In your load script, are the MonthNames in lowercase?

 

SET MonthNames='Jan;Feb;Mar;Apr;May;Jun;Jul;Aug;Sep;Oct;Nov;Dec';

JuanGerardo
Partner - Specialist
Partner - Specialist

Hi @janus2021, probably the fastest way to solve this is to configure the short names for moths. This can be done in the reload script, using the MonthNames variable, like in following sentence:

SET MonthNames='ene.;feb.;mar.;Abr.;may.;jun.;jul.;ago.;sept.;oct.;nov.;dic.';

Usually you can already find this variable at the beginning of any script.

JG

rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

I think you have an extra space that needs to be removed.

sum( { 1<Month={"$(=Month(Today()))"} > } LineSalesAmount)

 

janus2021
Contributor III
Contributor III
Author

I didn't have this in the scriptT, when adding it did the trick for my problem:

SET MonthNames='Jan;Feb;Mar;Apr;May;Jun;Jul;Aug;Sep;Oct;Nov;Dec';