Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Qlikview Experts,
I am new to Qlikview and I want to add to columns of a Table. The Table is a result of a concatenation of 2 Tables. Please find attached the Table (result of concatenation).
This my script code but it didn't work (the decimal separator is ',' and the thousands separator is either space or null):
Directory;
LOAD CODUSN,
CODEART,
TRANSACTION_DATE,
CODESART,
TYPEART,
CODUNT,
QUANTITE,
NATIO,
CODUSNSRC_DST,
QTERED,
Num( QUANTITE, '###0,###', ',' , ' ' ) + Num(QTERED, '###0,###', ',' , ' ') AS QUANTRED
FROM
[..\..\..\personnel\Qlickview\QVD\TRANSFERT.qvd]
(qvd);
Hi ,
Writethe conddition is like below.
Num( QUANTITE, '###0,###', ',' , ' ' ) &'-'& Num(QTERED, '###0,###', ',' , ' ') AS QUANTRED
Hi ,
Writethe conddition is like below.
Num( QUANTITE, '###0,###', ',' , ' ' ) &'-'& Num(QTERED, '###0,###', ',' , ' ') AS QUANTRED
hello
if you want to add the 2 columns
why don't you use
Num( QUANTITE+QTERED, '###0,###', ',' , ' ') AS QUANTRED
?
you used
RANGESUM()
Rangesum(num(QUANTITE) ,num(QTERED) ) AS QUANTRED
so is correktly
this sum all numfielsd
Use & operator to concatenate like below.
Column1 & ' ' & Column2 as Column 3
Hi Abdallah,
you can achieve this like below
Way 1:-
T1;
LOAD CODUSN,
CODEART,
TRANSACTION_DATE,
CODESART,
TYPEART,
CODUNT,
QUANTITE,
NATIO,
CODUSNSRC_DST,
QTERED,
QUANTITE,
QTERED
FROM
[..\..\..\personnel\Qlickview\QVD\TRANSFERT.qvd]
(qvd);
Load *,
Num( QUANTITE, '###0,###', ',' , ' ' ) + Num(QTERED, '###0,###', ',' , ' ') AS QUANTRED
Resident T1;
Drop Table T1;
Way 2:-
Example i am giving here
LOAD
uniqueid,
residentialunitprice,
maintenancefundprice,
totalcustomizationcharges,
totalservicetax,
totalvat,
wc,
Rangesum(residentialunitprice, maintenancefundprice, totalcustomizationcharges, totalservicetax, totalvat, wc) as S_TotalCharges,
FROM
[tesaleorde.qvd]
(qvd);
In RangeSum() you have give comma not + symbol.
Do one condition
if(QTERED=null(), QUANTITE,
if(QUANTITE=null(),QTERED
if(QTERED=null() and QUANTITE=null(),null(),QUANTITE+QTERED)))as QUANTRED
I hope it will works.
HI,
PFA,
try this it will work
demo e.g.
load *,
If(len(trim(v1))= 0,v2,if(len(trim(v2))= 0,v1,v1+v2)) as new;
LOAD * INLINE [
id, v1, v2
1, , 2
2, , 5
3, , 8
4, 12
5, 54
6, 89
7, 55
8,6,8
9,2,3
];