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

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
paulyeo11
Master
Master

How to combine 2 load script into 1 for compute total asset ?

Hi All

I have below 2 load script working fine :-

If([Reporting Code]>=50010 and [Reporting Code]<=50090,'cURR_ASSET') as [cURR_ASSET],

If([Reporting Code]>=20005 and [Reporting Code]<=20063,'fIXED_ASSET') as [fIXED_ASSET],

I try to combine the above 2 into 1 load script , i try below :-

If([Reporting Code]>=50010 and [Reporting Code]<=50090,'cURR_ASSET',

If([Reporting Code]>=20005 and [Reporting Code]<=20063,'fIXED_ASSET',

))as [tOTAL_ASSET]

it return wrong value. Can some one advise me ?

it should be look some thing like below :-

If([Reporting Code]>=50010 and [Reporting Code]<=50090) & ([Reporting Code]>=20005 and [Reporting Code]<=20063,'tOTAL_ASSET') as [tOTAL_ASSET],

Paul

1 Solution

Accepted Solutions
settu_periasamy
Master III
Master III

Hi Paul,

May be something like this..

If(  ([Reporting Code]>=50010 and [Reporting Code]<=50090) or 
(
[Reporting Code]>=20005 and [Reporting Code]<=20063),
'tOTAL_ASSET')
as [tOTAL_ASSET]


OR

if you want the fIXED ASSET and cURR ASSET value in your tOTAL ASSET field, try something like..


If([Reporting Code]>=50010 and [Reporting Code]<=50090,'cURR_ASSET',
If([Reporting Code]>=20005 and [Reporting Code]<=20063,'fIXED_ASSET'))as [tOTAL_ASSET]

View solution in original post

4 Replies
settu_periasamy
Master III
Master III

Hi Paul,

May be something like this..

If(  ([Reporting Code]>=50010 and [Reporting Code]<=50090) or 
(
[Reporting Code]>=20005 and [Reporting Code]<=20063),
'tOTAL_ASSET')
as [tOTAL_ASSET]


OR

if you want the fIXED ASSET and cURR ASSET value in your tOTAL ASSET field, try something like..


If([Reporting Code]>=50010 and [Reporting Code]<=50090,'cURR_ASSET',
If([Reporting Code]>=20005 and [Reporting Code]<=20063,'fIXED_ASSET'))as [tOTAL_ASSET]

paulyeo11
Master
Master
Author

Hi Settu

Many thank it work fine.

Paul

paulyeo11
Master
Master
Author

Hi Settu

this is one of the script you give me :-

If([Reporting Code]>=50010 and [Reporting Code]<=50090,'cURR_ASSET',
If([Reporting Code]>=20005 and [Reporting Code]<=20063,'fIXED_ASSET'))as

[tOTAL_ASSET]


I am getting null value.


Paul

settu_periasamy
Master III
Master III

Hi Paul,

Can you check the 'Report Code' value is available (between 50010 and 50090) ? and is that created the new field 'tOTAL ASSET' ?