Qlik Community

QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

Announcements
Make your voice heard! Participate in the 2020 Wisdom of Crowds® Survey. BEGIN SURVEY
janturon
New 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
Highlighted
MVP & Luminary
MVP & Luminary

Re: Bad format of Month saved in variable

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
Highlighted
MVP & Luminary
MVP & Luminary

Re: Bad format of Month saved in variable

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

Highlighted
janturon
New Contributor III

Re: Bad format of Month saved in variable

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

Where can I see format of Fields?

Highlighted
MVP & Luminary
MVP & Luminary

Re: Bad format of Month saved in variable

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".