Qlik Community

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
IMPORTANT security patches for GeoAnalytics Server available to download: READ DETAILS
cancel
Showing results for 
Search instead for 
Did you mean: 
janturon
Contributor III
Contributor III

Bad format of Month saved in variable

Hi,

I need help with variable.

I have Field Month with values in format like this:

Month

01

02

03

I have defined variable:

vmaxmonth=Max(Month)

But result of vmaxmonth in set analysis or text object is not 03, but 3.

1 Solution

Accepted Solutions
kaushiknsolanki

Hi,

This depends on what data format you have in Month field.

If it is a Text then you should use the Maxstring instead of Max function.

If it is a numeric value you should use num(Max(Month),'00')

Regards,

Kaushik Solanki

Regards,
Kaushik
If reply is satisfactory, please "Like" the post.
If reply is solution, please mark as "Correct".

View solution in original post

3 Replies
kaushiknsolanki

Hi,

This depends on what data format you have in Month field.

If it is a Text then you should use the Maxstring instead of Max function.

If it is a numeric value you should use num(Max(Month),'00')

Regards,

Kaushik Solanki

Regards,
Kaushik
If reply is satisfactory, please "Like" the post.
If reply is solution, please mark as "Correct".
janturon
Contributor III
Contributor III
Author

This is right: num(Max(Month),'00')

Where can I see format of Fields?

kaushiknsolanki

The Easy option is, add the filter on sheet and observe the data, if it is on left side it is text else it is number.

Regards,

Kaushik Solanki

Regards,
Kaushik
If reply is satisfactory, please "Like" the post.
If reply is solution, please mark as "Correct".