Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
Anil_Babu_Samineni
MVP
MVP

Month Number

Hi,

I have one field

LOAD * INLINE [

    MonthFrench

    janvier

    février

    mars

    avril

    mai

    juin

    juillet

    août

    septembre

    octobre

    novembre

    décembre

];

So, here i want to show number 1,2,3,4,....12 in list box. How?

If i use this

if(MonthFrench='janvier',1,

//        if(MonthFrench='février',2,

//              if(MonthFrench='mars',3,

//                    if(MonthFrench='avril',4,

//                          if(MonthFrench='mai',5,

//                                if(MonthFrench='juin',6,

//                                           if(MonthFrench='juillet',7,

//                                                           if(MonthFrench='août',8,

//                                                                 if(MonthFrench='septembre',9,

//                                                                      if(MonthFrench='octobre',10,

//                                                                            if(MonthFrench='novembre',11,

//                                                                                 if(MonthFrench='décembre',12))))))))))))

It will come, But i want to see only these values instead of Name months

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
Labels (1)
1 Solution

Accepted Solutions
sunny_talwar
MVP
MVP

If you want to replace MonthFrench, then may be this:

LOAD MonthFrench as MonthName,

          RowNo() as MonthFrench

INLINE [

    MonthFrench

    janvier

    février

    mars

    avril

    mai

    juin

    juillet

    août

    septembre

    octobre

    novembre

    décembre

];

View solution in original post

12 Replies
sunny_talwar
MVP
MVP

How about this:

LOAD *,

          RowNo() as MonthNum

INLINE [

    MonthFrench

    janvier

    février

    mars

    avril

    mai

    juin

    juillet

    août

    septembre

    octobre

    novembre

    décembre

];

MindaugasBacius
Partner - Specialist III
Partner - Specialist III

=num(Month(DateField))

Month is a dual function. It contains the text and the numerical value.

Anil_Babu_Samineni
MVP
MVP
Author

I have only Month Field in that what i need to do. If i am doing mapping getting error

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
sunny_talwar
MVP
MVP

What is your exact script?

Anil_Babu_Samineni
MVP
MVP
Author

Nothing there, In my script i have like below

LOAD * INLINE [

    MonthFrench

    janvier

    février

    mars

    avril

    mai

    juin

    juillet

    août

    septembre

    octobre

    novembre

    décembre

];


Expected output is


Listbox

1

2

3

4

5

6

7

8

9

10

11

12

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
MindaugasBacius
Partner - Specialist III
Partner - Specialist III

Use Sunny T suggestion.

In the List Object look for MonthNum.

If you are doing some mapping or so let us now.

sunny_talwar
MVP
MVP

Like this, right?

Capture.PNG

Anil_Babu_Samineni
MVP
MVP
Author

Do i need to change name, If i want to show same name of the field

Like below, Is this possible

LOAD *,

          RowNo() as MonthFrench

INLINE [

    MonthFrench

    janvier

    février

    mars

    avril

    mai

    juin

    juillet

    août

    septembre

    octobre

    novembre

    décembre

];

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
sunny_talwar
MVP
MVP

If you want to replace MonthFrench, then may be this:

LOAD MonthFrench as MonthName,

          RowNo() as MonthFrench

INLINE [

    MonthFrench

    janvier

    février

    mars

    avril

    mai

    juin

    juillet

    août

    septembre

    octobre

    novembre

    décembre

];