Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements
Announcing the newest addition to the Qlik Community, Qlik Gallery! Learn More
Shrikant_Qlik
New Contributor III

Re: Addition or subtraction of values in rows

Hello,

i managed it to do using a variable as below.

2019-06-14_09h48_25.png

but i was wondering if i can avoid one more resident load and instead hust load 2 values from 2 variables in load statement like . It doesn't give any error but no values in the table.


SUMB1:
LOAD
'B-A' as SGroup,
($(vB) - $(vA))as StockValue;

Channa
Valued Contributor III

Re: Addition or subtraction of values in rows

can you try preceding load

 

like

 

Load
'A-B' as Desc,(ValueB-ValueA) as Value ;


LOAD
IF(Desc='B', Value) as ValueB ,
IF(Desc='A', Value) as ValueA
FROM [lib://Source/Grouping.xlsx]
(ooxml, embedded labels, table is Sheet1) where WildMatch(Desc,'B','A') ;

Channa
Highlighted

Re: Addition or subtraction of values in rows

Check attached

image.png

Shrikant_Qlik
New Contributor III

Re: Addition or subtraction of values in rows

Thanks Genius 🙂