Hello !
I know that my data have not been well designed but I have to use them ‘as is’.
I have a first dimension [Location type] with members like:
Instead of having a single dimension like [Location name] I have separated ones:
- [Office]
- Office name 1
- Office name 2
- [Factory]
- Factory name 1
- Factory name 2
- Factory name 3
- [Warehouse]
I would like to have a result like this:
- [Location type]
– [Location name]
i.e I would like that the dimensions [Office], [Factory] and [Warehouse] would be considered as a single [Location name] dimension. Is it possible? Do I have to concatenate them on some way?
Thanks in advance for your answers!
Rudy.
I would suggest considering creating a new dimension Locations by type where you combine both custom field into new - calculated one. You can use JavaScript to calculate this during import.
I will use two my custom fields - Season and Month as examples and will create a new dimension Months by Season:
[jira.customfield_nc]
name = "Month by season"
data_type="string"
dimension = true
levels = ["Season","Month"]
split_by = "|"
javascript_code = '''
l1 = issue.fields.customfield_SSSSS ? issue.fields.customfield_SSSSS : "(none)";
l2 = issue.fields.customfield_MMMMM ? issue.fields.customfield_MMMMM : "(none)";
issue.fields.customfield_nc = l1 + "|" + l2;
'''
Please use your custom field ID instead of SSSSS and MMMMM.
If the custom field is a selection list, you might need a bit different code to access it’s value for example, like this:
l1 = ( issue.fields.customfield_SSSSS && issue.fields.customfield_SSSSS.value) ? issue.fields.customfield_SSSSS.value : "(none)";
We strongly suggest testing any calculated JavaScript code before adding it to eazyBI advanced settings to make sure it works as expected.
Daina / support@eazybi.com
Hello and thanks for your answer, but I am sorry I do not understand how I may transform my 3 current dimensions [Office], [Factory] and [Warehouse] to the unique [Location name]. Only then I will be able to build the hierarchy.
eazyBI does not have a default option to combine two or three fields by default. We will build three dimensions. If you would like to have one common dimension with a hierarchy you would like to build one.
We have the option to build new custom fields (including dimensions) with JavaScript during import. You would like to define a new field and then use Javascript code to combine three of your existing jira fields into one.
I hope this additional explanation can help you understand how to use the definition in the previous answer for building a new dimension.
You can share more details to support@eazybi.com if you struggle with this share how far you got there what is the JIra setup and we will try to help you further.
Daina / support@eazybi.com