Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Kohli
Creator II
Creator 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
Champion III
Champion III

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
Master II
Master II

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.