Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

Highlighted
Kohli
Contributor II

Addition of 2 with existing marks

I have student batch and marks fields in a table. I need to add marks to particular batch,

 

Ex:

Batch, Sid, Marks

ABC, 1, 10

ABC, 2, 12

ABC, 3, 12

ABC, 4, 13

XYZ, 1, 12

XYZ, 2, 13

XYZ, 3, 12

I need to ADD +2 marks to Batch = ABC, Please suggest me.

 

 

Labels (1)
2 Replies
vishsaggi
Esteemed Contributor III

Re: Addition of 2 with existing marks

Try this?

Ex:
LOAD Batch, Sid, IF(Batch = 'ABC', Marks+2, Marks) AS Marks INLINE [
Batch, Sid, Marks

ABC, 1, 10

ABC, 2, 12

ABC, 3, 12

ABC, 4, 13

XYZ, 1, 12

XYZ, 2, 13

XYZ, 3, 12
];
pradosh_thakur
Honored Contributor II

Re: Addition of 2 with existing marks

load *,if(Batch='ABC',Marks+2,Marks) as New_Marks inline [

Batch, Sid, Marks

ABC, 1, 10

ABC, 2, 12

ABC, 3, 12

ABC, 4, 13

XYZ, 1, 12

XYZ, 2, 13

XYZ, 3, 12

];
Learning never stops.