Zero Values exporting to CSV
I am using Monarch 13.5 and bringing in a txt file and exporting as a csv file. I have a field that contains zero values. I need the field to show as a blank in the exported csv file, if it is a zero value. In Monarch, I can suppress the zero value, but it still exports as a zero.
Janet Grimsley
Answers
-
Hey Janet, are you talking about Monarch Classic, or Data Prep Studio?
In either case, I think you will need to create a formula field that will result in a null if the value is 0.
One formula to accomplish this is [Column] / [Column] * [Column]
0 -
Janet,
What is the target application for the exported CSV file?
If the exported column is going to be interpreted as numeric when imported to the target application what will that application do with blanks or specific NULL outputs?
Or to look at is another way - an alternative approach to consider is, like Stephen's suggestion, to create a calculated field and export that instead of the "real" field but just make the field Character. That way if it present in Monarch as blank I would expect it to be exported as blank. However the target application may do something else with it when assessing it for ingestion. Hence the question.
Grant
0 -
Altair Forum User said:
Hey Janet, are you talking about Monarch Classic, or Data Prep Studio?
In either case, I think you will need to create a formula field that will result in a null if the value is 0.
One formula to accomplish this is [Column] / [Column] * [Column]
Stephen, I am using 13.5 Complete. I did use a new formula that solved the problem. I was trying not to create a formula, thinking Monarch would export as I was seeing it on the screen.
0 -
Altair Forum User said:
Janet,
What is the target application for the exported CSV file?
If the exported column is going to be interpreted as numeric when imported to the target application what will that application do with blanks or specific NULL outputs?
Or to look at is another way - an alternative approach to consider is, like Stephen's suggestion, to create a calculated field and export that instead of the "real" field but just make the field Character. That way if it present in Monarch as blank I would expect it to be exported as blank. However the target application may do something else with it when assessing it for ingestion. Hence the question.
Grant
When I converted to character the zero presented as a blank, but still exported the zero. Weird behavior, but a formula solved the problem. I created a new column,
If(F25 = "0","", F25) 0