Skip to main content
Announcements
Qlik Connect 2025: 3 days of full immersion in data, analytics, and AI. May 13-15 | Orlando, FL: Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
smilingjohn
Specialist
Specialist

Variable

HI ALl,

Can someone explain me what does the below expression does ?

mid(FileName(),34,6) as Year_Month,

1 Solution

Accepted Solutions
avinashelite

mid(FileName(),34,6) as Year_Month,


mid() if the function to fetch the values between a range

34 - starting point of the fetching the values

6 - is the length till it should fetch i.e it will fetch the values from 34 to 40

View solution in original post

3 Replies
prma7799
Master III
Master III

From Qlikview Help

Mid - script and chart function

Mid() returns the part of the input string starting at the position of the character defined by the second argument, 'start', and returning the number of characters defined by the third argument, 'count'. If 'count' is omitted, the rest of the input string is returned. The first character in the input string is numbered 1.

Syntax:

Mid(text, start[, count])

Return data type: string

Arguments:

ArgumentDescription
textThe original string.
startInteger defining the position of the first character in text to include.
countDefines the string length of the output string. If omitted, all characters from the position defined by start are included.
avinashelite

mid(FileName(),34,6) as Year_Month,


mid() if the function to fetch the values between a range

34 - starting point of the fetching the values

6 - is the length till it should fetch i.e it will fetch the values from 34 to 40

marcus_malinow
Partner - Specialist III
Partner - Specialist III

hate to nit-pick

it will retrieve characters 34 to 39 (inclusive)