Skip to main content
Veteran
September 1, 2023

Data Import: treat a dash a zero

  • September 1, 2023
  • 3 replies
  • 0 views

Hi

Is it possible to treat a dash/hyphen as a zero during a data import from a file?

Thanks,

Mark

3 replies

OneStream Employee
September 1, 2023

You could through a rule on the Amount field, but in an attempt not to go that route you could try to Substitution settings on the Data Source Amount field. I have not tested this particular situation though.

EricOsmanski_0-1693573581576.png

 

MarkBirdAuthor
Veteran
September 4, 2023

Thanks Eric, I'll give that a try.

My only concern is that it may cause an issue with negative values?

OneStream Employee
September 4, 2023

Delete original post

Contributor
September 7, 2023

Perhaps a complex expression in the Amount field of the data source? Off the top of my head, maybe something like this:

 

 

If args.Value = "-" Then
	Return 0
Else
	Return args.Value
End If