I am using a multi-row transformation, but I cannot seem to get the IF statement correct, hoping someone can help me out.
Here is the incoming data:
Count         Total          
3              3372.08    
3                245.73     
3              3617.81     
This is current output:
| Count | Total | Label | 
| 3 | 3372.08 | TOTAL INVOICED PREMIUM | 
| 3 | 245.73 | TOTAL INVOICED PREMIUM | 
| 3 | 3617.81 | TOTAL INVOICED PREMIUM | 
Need it to be:
| Count | Total | Label | 
| 3 | 3372.08 | TOTAL INVOICED PREMIUM | 
| 3 | 245.73 | INVOICED NO DEDUCTIONS | 
| 3 | 3617.81 | TOTAL INVOICE | 
Here is my logic in the Multiple Row tool:
IF [Row-1:Count] = 3 then "TOTAL INVOICED PREMIUM"
ELSEIF [Row-1:Count] + 1 = 3 then "INVOICED NO DEDUCTIONS"
ELSEIF [Row-1:Count] + 2 = 3 then "TOTAL UNUM INVOICE"
else 0
ENDIF
Any help is greatly appreciated :-)
Cross-threading from this duplicate post:
Hello @knamc_com
Your IF formula must be changed from colum "Count" to "Label", because all the rowls have 3 as value.
Pay attention if "Total" is numeric or string.
Since you just have those options, type in the normal Formula tool:
IIF([Total] = 3372.08, "TOTAL INVOICED PREMIUM",
IIF([Total] = 3617.81 , TOTAL INVOICE,
IIF([Total] = 245.73 , "INVOICED NO DEDUCTIONS",
"")))
@knamc_com 
use this
if [Row-2:Count] = 3 and [Row-2:Count] = 3 then "TOTAL INVOICE" elseif [Row-1:Count] = 3 and [Count] = 3 then "INVOICED NO DEDUCTIONS" else "TOTAL INVOICED PREMIUM" endif
hope this helps.
@knamc_com 
It looks like that the label is based on the Row number?
If yes, then we can use a Tile tool to do as below
Total will always be different but # of rows will be the same, thank you
 
					
				
				
			
		
