MDX Val function does not return expected values

Hi everyone,

What I am trying to do sounds very simple but I am stumped on it. I don’t understand what’s wrong in my formula. Any help would be welcome.

I want to cast a Jira custom field (“Grooming Extreme Quotation”) in a decimal value to display it on a timeline chart.

I applied this formula for my calculated field (“Groomed Story Points”):
Val([Measures].[Issue Grooming Extreme Quotation])

I get values 0 for all lines. Yet, custom field does contain values.

Any idea?

Thanks for helping,
Vianney

Hi all,

My problem has been resolved by changing the field type in Jira.
Apparently casting field types in eazyBI is not as simple as it sounds.

Vianney

Hi @Vianney_Dugrain,

Happy to hear you resolved the issue. It is possible to change the custom fields value type also within eazyBI. You have to define this change in the eazyBI advanced settings by adding the parameters below:

[jira.customfield_NNNNN]
data_type = "decimal"

You would have to replace the NNNNN with the ID of the custom field. Please visit the eazyBI documentation page for more information on the advanced settings for custom fields - https://docs.eazybi.com/eazybijira/data-import/custom-fields/advanced-settings-for-custom-fields.

Kind regards,
Roberts // eazyBI support

Hi @roberts.cacus,
Thanks for your answer.
I found the resource you mention but from my understanding, it requires to be EazyBI admin, which unfortunately I am not.

Hello @roberts.cacus,

I am experiencing the same issue with customfields types.
I am for my part, Eazy BI admin and have tried the solution that you mentioned but it did not work and neither does the “VAL” MDX function.

Precisely I am trying to get a numeric value from a custom field (And i don’t want to change its type in JIRA if possible) and I am still getting an error when I try to divide it getting the following error : “#ERR: mondrian.olap.fun.MondrianEvaluationException: Expected value of type NUMERIC; got value ‘60’ (STRING)” after trying the following advanced settings :
[jira.customfield_10700]
data_type=“decimal”

Do you know what could be wrong?
Thanks in advance !
Regards,
Matthieu

@Matthieu_Oudeau

You can try to import the custom field as a measure by adding the measure = true parameter to the eazyBI advanced settings for the particular custom field:

[jira.customfield_10700]
data_type=“decimal”
measure = true

Then use the measure instead of the issue property in the report.

The other option you can try is using the Cast() operator instead of Val():

Cast([Measures].[PROPERTY_NAME] as numeric)

See the eazyBI documentation page regarding this - https://docs.eazybi.com/eazybijira/analyze-and-visualize/calculated-measures-and-members/mdx-function-reference#MDXFunctionreference-Operators.

Best,
Roberts // support@eazybi.com

Hello @roberts.cacus,

Thank you very much for your response, the Cast solution works perfectly !

Best regards,
Matthieu

1 Like