Qlik Community

Ask a Question

App Development

Discussion board where members can learn more about Qlik Sense App Development and Usage.

Announcements
April 22, 2PM EST: Learn about GeoOperations in Qlik Sense SaaS READ MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
lylererger
Creator II
Creator II

QS Feb2020 Convert String to Number | Script Error | when Concatenate Tables

Hi all

Already spent 2 hours on an elementary task. No matter how hard I try, nothing comes out.

I am trying to add another artificial value "1111" to the ID field, but when Concatenating this table, the integer format is interpreted as String. Any squats in this regard did not give any success.

Look at the simple Script:

tmpData: LOAD * Inline [tmpField];

tmp_1:
LOAD
   type_period&'|'&level_name&'|'&Num(dt) as [% ПК],
    ID_POK_N as [ПоказательID],
    type_period as [Уровень Период],
    level_name   as [Уровень Имя],
    Year(dt)&Num(Month(dt),'00') as [ГодМесяц],
    Month(dt)&Right(Year(dt),2) as [МесяцГод],
    Date(dt) as [Дата],
    Num(dt) as [ДатаЧисло],
    P_name as [Показатель Имя],
    "fact" as [Факт],
    plan as [План]
FROM [lib://marketShare/QVD/DataTier1/KFLPKVK.qvd](qvd)
Where Match(ID_POK_N,'110','111','112','114','170070458');
 
Left Join (tmp_1)
LOAD
  type_period&'|'&level_name&'|'&Num(dt) as [% ПК],
  sum("fact") as [Объём Рынка]
FROM [lib://marketShare/QVD/DataTier1/KFLPKVK.qvd](qvd)
Where Match(ID_POK_N,'170070459')
Group By
  type_period&'|'&level_name&'|'&Num(dt);
 
Concatenate (tmp_1)
Load
[% ПК],
Num#(1111,'# ##0') as [ПоказательID],
sum([Объём Рынка]-[Факт]) as [Факт]
Resident tmp_1 Group By [% ПК];
 
Doesn't works:
1. Num(1111,'# ##0')
2. Num(1111)
3. Num#(1111,'# ##0')
4. Num#(1111)
5. 1111 as [ПоказательID]
6. (1111)*1 
7. Evaluate(1111) 
8. Evaluate(1111) *1 
9. Any kind of transformations doesn't works...
 
So it looks like 'surprise' from Qlik
 
Ошибка.PNGСнимок2.PNG
 
Please help me fix that bug.
 
Thanks in advance
1 Solution

Accepted Solutions
lylererger
Creator II
Creator II
Author

OMG (!)

Solution that helps me:

Subfield(1111, ' ', 1) as [Показатель ID]

View solution in original post

3 Replies
kaushiknsolanki
Luminary Alumni
Luminary Alumni

Hi Try this.

Num(Num#(1111))

Regards,
Kaushik
If reply is satisfactory, please "Like" the post.
If reply is solution, please mark as "Correct".
lylererger
Creator II
Creator II
Author

Doesn't works

lylererger
Creator II
Creator II
Author

OMG (!)

Solution that helps me:

Subfield(1111, ' ', 1) as [Показатель ID]

View solution in original post