Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
rcorcoran
Creator
Creator

renaming in a label of an expression

Hi

I have a label in a straight table to show the Max ReferredMM and selected year as below:

='WTE  '& (Max(ReferredMM))& ' ' & (GetFieldSelections(ReferredYYYY))

it is working fine but is bringing back:

WTE 3 2016 for march.

I want to rename it to show Mar instead of the 3.

I have a month mapping in my script as follows which works for other things but I can't seem to use it for this any help would be great.

MonthMapping:

LOAD * INLINE [

ReferredMM, Month

1, 'Jan'

2, 'Feb'

3, 'Mar'

4, 'Apr'

5, 'May'

6, 'Jun'

7, 'Jul'

8, 'Aug'

9, 'Sep'

10, 'Oct'

11, 'Nov'

12, 'Dec'

];

1 Solution

Accepted Solutions
settu_periasamy
Master III
Master III

Maybe try this..

='WTE  '&

Month(

       Date#((Max(ReferredMM)),'M'))

& ' ' & (GetFieldSelections(ReferredYYYY))

View solution in original post

18 Replies
Colin-Albert

Try using  maxstring(Month)  instead of max(ReferredMM)

sunny_talwar

or FirstSortedValue(Month, -ReferredMM)

MK_QSL
MVP
MVP

='WTE  '& Month(MakeDate(Year(Today()),Max(ReferredYYYY))) & ' ' & (GetFieldSelections(ReferredYYYY))

rcorcoran
Creator
Creator
Author

Hi Manish

Thank you for your reply but it is not todays date but the last month the data has gone into the database that I need to show.

Anonymous
Not applicable

Hi rcorcoran,

Store on a variable Max(ReferredYYYY), and replace Max(ReferredYYYY) with Month(vYourVarName)

Regards

settu_periasamy
Master III
Master III

Maybe try this..

='WTE  '&

Month(

       Date#((Max(ReferredMM)),'M'))

& ' ' & (GetFieldSelections(ReferredYYYY))

sunny_talwar

How is it decided which data needs to shown?

Anonymous
Not applicable

Sorry, I've explained it wrong:

     On variable -> Makedate(Year(Today()),Max(ReferredMM),1)

     On label -> Month(vYourVarName)

Thanks.

rcorcoran
Creator
Creator
Author

The max month of data loaded is shown ie referredMM and year filtered on a list box

Rhona Corcoran

Project Manager

Office of the Chief Information Officer | HSE | Dr. Steevens’ Hospital | Dublin 8 |Eircode D08 W2A8

Tel: +353 (0) 6352710

rhona.corcoran@hse.ie

The Office of the Chief Information Officer; delivering eHealth Ireland