Download Free Trial

Define a field 2 times with 2 different data type

Hi team, 
For example here I have a JSON data like this:

“country” : “Canada”,
“state” : “Ontario”,
“city” : “Toronto”,
“date” : “04/04/2016”,

Could we define the date field 2 times with 2 different data type? Like this:

date“:{“uniqueName”: “date“, “type”: “year/quarter/month/day”, “caption”:”Start of period”, “dimensionUniqueName”: “Date”},
 “date“:{“uniqueName”: “Date (Start of period)“, “type”: “date string”, “caption”:”Date (Start of period)”, “dimensionUniqueName”: “Date”}

Because now I see that it only get the second definition above. It means that I can only see the column “Date (Start of period)”

Many thanks.

2 answers

Dmytro Zvazhii Flexmonster December 15, 2016

Hello Quan Hieu,
Thank you for the detailed explanation. Please note that when you are defining the fields they should be unique. When you are referring to the same field it will rewrite the previously created. The best way to achieve your goal is to duplicate the data under the separate field. It will look like the following:

   "country" : "Canada",
   "state" : "Ontario",
   "city" : "Toronto",
   "date1" : "04/04/2016",
   "date2" : "04/04/2016"

Please, let us know if it works for you.
Best regards,

Quan Hieu December 16, 2016

Thanks Dmytro.

Please login or Register to Submit Answer