I would like to count or sum how many 1's in last four days (1/1 to 1/4) for each name (A, B, C, D) in Informatica Developer. Advise please!!
simply create an exp transformation and a new output port. Formula should be like this-
o_how_many_1s= day1 + day2+day3+day4
Now, you said, all the day* values can be wither 0 or 1, so adding them will give you count of 1s.
If you have null in these fields, then you can use IIF(isnull(day1),0,day1)
logic while adding.
If you have some numbers other than 0,1, then, then you need to use something specific like this
o_how_many_1s= IIF(day1=1,1,0) + IIF(day2=1,1,0)+IIF(day3=1,1,0)+IIF(day4=1,1,0)