cancel
Showing results for 
Search instead for 
Did you mean: 

Function "-" expects parameter to be of type number in sac

former_member550064
Discoverer
0 Kudos

Hi Guys,

I have added a draft Data Source to a model and i'm in the stage of finalizing Mappings. I have split two time stamp columns into Date and time(Hire date,Hire Time) and (Date of Birth, Birth Year). Now I'm creating a Calculated Column and added the formula [Birth Year] - [Hire Year]. Then I got the below error message.

"Formula Could not be computed:Function "-" expects parameter to be of type number " try rewriting the formula"

Please find the attached Screen shot.

Regards,

Ram

Accepted Solutions (1)

Accepted Solutions (1)

former_member650982
Participant
0 Kudos

If you are trying to do this in the model creation phase.

Then you have to change the column to a number before using it in a formula that needs a number

For some reason SAC does not support to number functions in the model builder

But in the story it does

If you need the number as a dimension simply copy and change so you have both of them

Answers (2)

Answers (2)

pooja_elangovan
Explorer
0 Kudos

Just check that both your specifications are measures because while doing calculations in the model only the measures can calculate we can't formate the dimensions.

venkateswaran_k
Active Contributor
0 Kudos

Hi

You need to convert the data type before applying - (subtract)

StringToNumber([Hire Year]) - StringToNumber([Birth Year])