Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

paulyeo11
Valued Contributor II

I have 2 script amount ,How to sum these 2 script amount ?

Hi All

May i know how to sum up the below script ?

if(right(@162:174T,1)='-', '-' & left(@162:174T, len(@162:174T)-1),@162:174T) as ab18,

if(right(@179:191T,1)='-', '-' & left(@179:191T, len(@179:191T)-1),@179:191T) as ab21,

I try below , it does not work :-

sum(
if(right(@162:174T,1)='-', '-' & left(@162:174T, len(@162:174T)-1),@162:174T))
+
sum(
if(right(@179:191T,1)='-', '-' & left(@179:191T, len(@179:191T)-1),@179:191T))
as ab1821,
1 Solution

Accepted Solutions

Re: I have 2 script amount ,How to sum these 2 script amount ?

How about this:

RangeSum(

If(Right(@162:174T,1)='-', '-' & Left(@162:174T, Len(@162:174T)-1),@162:174T),

If(Right(@179:191T,1)='-', '-' & Left(@179:191T, Len(@179:191T)-1),@179:191T)) as ab1821

3 Replies

Re: I have 2 script amount ,How to sum these 2 script amount ?

How about this:

RangeSum(

If(Right(@162:174T,1)='-', '-' & Left(@162:174T, Len(@162:174T)-1),@162:174T),

If(Right(@179:191T,1)='-', '-' & Left(@179:191T, Len(@179:191T)-1),@179:191T)) as ab1821

paulyeo11
Valued Contributor II

Re: I have 2 script amount ,How to sum these 2 script amount ?

THank you sunny , it work

Re: I have 2 script amount ,How to sum these 2 script amount ?

Awesome, I am glad it did

Community Browser