Qlik Community

Ask a Question

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
Join us at the Cloud Data and Analytics Tour! REGISTER TODAY
cancel
Showing results for 
Search instead for 
Did you mean: 
valem
Partner
Partner

REST field to Numeric value

Hi all,

I've loaded a field from a rest call. 

CUSTOM CONNECT TO ".......";
RestConnectorMasterTable:
SQL SELECT
"__KEY_root",
(SELECT
"id" AS "id_u7",
.....
"amount" AS "amount_u0",
......
"__FK_results",
"__KEY_results",
(SELECT
"data".....
FROM JSON (wrap on) "root" PK "__KEY_root";

[doc]:
LOAD 
[amount_u0] as amount,
.....
RESIDENT RestConnectorMasterTable
WHERE NOT IsNull([__FK_results]);

 

All values are correctly loaded, BUT they are considered as TEXT. As consequence if I want to do sum of those values, result is undefined.

I've tried to load value as 

Num#([amount_u0],'0,00') as amount,

but without success. Could you help me? What I'm doing wrong? Thanks a lot.

 

Labels (3)
1 Reply
Brett_Bleess
Support (Former)
Support (Former)

You would need to use Num() function in this case I believe, here is Help link:

https://help.qlik.com/en-US/qlikview/April2020/Subsystems/Client/Content/QV_QlikView/Scripting/Forma...

I always get confused on the # versus non # functions too, it gets even more confusing when you have to combine them to get what you need, maybe one of the other development gurus can chime in too and add some further explanation as to why Num# was the wrong function to use in this case, but I am pretty sure Num() should work for you.

Regards,
Brett

To help users find verified answers, please do not forget to use the "Accept as Solution" button on any post(s) that helped you resolve your problem or question.
I now work a compressed schedule, Tuesday, Wednesday and Thursday, so those will be the days I will reply to any follow-up posts.