Compare fields' value on same issue

I get a Jira field names as “First Defect Version” which is single value field and having same value with “Fix version”.
image

On EazyBI measures, I want to look for issues that sharing same value on those fields by adding this condition to the filter.
image

However it seems not working. Can you help me out to revising the condition?

Hi @Tuan_Nguyen,

From what you’ve posted, the formula seems fine, but there are a couple of potential issues to look into:

  1. Check that the measure names are correct. MDX is case-sensitive, so even small typos can cause issues. Using the auto-fill feature in the formula editor can help avoid that.
  2. Check if the “Fix version” is a single value field, if it’s a multi-value field, the formula won’t work as expected.
  3. I only see a part of the formula. It could be that other conditions in your formula are causing the issue.

I hope this helps.

Best,
Marita from support@eazybi.com

Hi @Marita_Norvele,

My situation falls into the second point where the Fix versions is multiple value field. How can I adjust the formula to fix the issue? I just wanted to compare to first value in Fix versions because it will always have a value in practice even it’s a multiple choice field.

Hi @Tuan_Nguyen,

In that case you can use the following formula:

--field with single value
[Measures].[Issue First Defect Version] MATCHES
Replace(
--field with multiple values
[Measures].[Issue fix versions],
--replace commas with OR operand |
",","|"
)

This formula compares the single-value field against the list of values from the multi-value field. It transforms the comma-separated values into a regular expression using the | (OR) symbol, and returns “true” if the single value matches any of the entries.

Best,
Marita from support@eazybi.com

1 Like

Hi @Marita_Norvele,
I tried your suggested formula, however it was not working. So I did a test for debug as in the figure. The condition always shows false.