Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

String To Number Conversion

Hello,

I am having Budget Data in Excel with Month as Text Data Type in Excel.

In my QV month is appearing as Numeric, I tried to convert this Month of Excel into number like..

Num#(ExcelMonth) & num(ExcelMonth) but did not work out.

When I concatenating Excel month to Calender Month it is giving me 2 value i.e 1 as Numeric & 1 as String...

I have checked over community as well but no success

Pls suggest how to achieve same?

1 Solution

Accepted Solutions
swuehl
MVP
MVP

Maybe like

LOAD

   BudgetYear,

   Month(Date#(BudgetYear & BudgetMonth,'YYYYMMM')) as BudgetMonth,

  ...

or just

LOAD

   BudgetYear,

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

  ...

View solution in original post

2 Replies
swuehl
MVP
MVP

Maybe like

LOAD

   BudgetYear,

   Month(Date#(BudgetYear & BudgetMonth,'YYYYMMM')) as BudgetMonth,

  ...

or just

LOAD

   BudgetYear,

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

  ...

smirkinaa
Contributor III
Contributor III

Hello, i suggest to create mapping table and use it.

\\

MonthsForReplacing:

Mapping LOAD

                    StringName,

                    Number

FROM

(ooxml, embedded labels, table is Лист1);

Budget:

LOAD BudgetYear,

          BudgetQuarter,

          BudgetMonth,

          ApplyMap('MonthsForReplacing',BudgetMonth) as BudgetMonthLikeNumber,

          BudgetValue

FROM

(ooxml, embedded labels, table is Sheet1);