Kenny_I
Kenny_I

Reputation: 2503

How to sum numerical variable values in Set variable activity in Azure Data Factory?

I have string variable "Distance1" with value '100' and "Distance2" with value '200' and "Distance3" with value '300'

I would like to create "TotalDistance" variable which cast variables as int or float and sums them together. String variable "TotalDistance" value would be 600.

How to formulate variable in "Set Variable" activity in Azure Data Factory?

Upvotes: 0

Views: 151

Answers (1)

Nandan
Nandan

Reputation: 4925

@string(add(add(int(variables('Distance1')),int(variables('Distance2'))),int(variables('Distance3'))))

Upvotes: 2

Related Questions