Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
ramya_grandhi
Contributor III
Contributor III

How to Convert String Data type to Number Data Type in Qlik Sense

Hello Everyone,

I am a beginner of Qlik Sense. I have a MonthName Field with values like Jan, Feb, Mar, .....Dec. According to the business requirement, I want the maximum Month from the MonthName field. As Max() can't be applied on the String Field I don't have any idea on how to extract the maximum Month from this field. Can anyone help me on this.

Thanks in Advance..

1 Solution

Accepted Solutions
sunny_talwar

In the script, convert the string to a dual month field like this

Month(Date#(MonthName, 'MMM')) as MonthName

Now you can use

Max(MonthName) to get a number

or

MaxString(MonthName) to get a text for the max month

View solution in original post

2 Replies
sunny_talwar

In the script, convert the string to a dual month field like this

Month(Date#(MonthName, 'MMM')) as MonthName

Now you can use

Max(MonthName) to get a number

or

MaxString(MonthName) to get a text for the max month

ramya_grandhi
Contributor III
Contributor III
Author

Thank You Sunny,