Faster way of calculating count based string Matches

Hi,

We are using eazyBI REST APIs import for pulling JSON bug data.

We want to calculate the count of reporter and such fields, based on strings in those fields. Below solution works fine, but, we feel it is slower to calculate. Any better suggestions to make it faster:

Aggregate({
Filter(
[CustomName Reporter].Members,
[CustomName Reporter].CurrenthierarchyMember.Name MATCHES (".@xyz.com.") OR
[CustomName Reporter].CurrenthierarchyMember.Name MATCHES (".@abc.com.")
)
})

Thanks,
Vrukesh

Hi Vrukesh,

A simple thing to try if that can improve the performance is to merge the two expressions of the Matches function into one:

Aggregate({
Filter(
[CustomName Reporter].Members,
[CustomName Reporter].CurrenthierarchyMember.Name MATCHES (".*@xyz.com|.*@abc.com.") 
)
})

However, such a change could make the formula just slightly faster.

A more effective solution is to implement a hierarchy in the data source. You can use the custom Javascript to extract the domain as another column and then build hierarchy in the Reporter dimension. I added following lines in my example:

Now I have additional column of the user organization and can map it accordingly:

After the data import, I have aggregated users by organization:

Kindly,
Janis, eazyBI support

Hi Janus,

Could get the Aggregate function working. As you expected, it does not help much really in speeding up.

Javascript solution gives error: “Execution of custom JavaScript code raised the following error:
TypeError: Cannot call method “match” of undefined”

Regards,
Vrukesh

Hi Vrukesh,

My example Javascript code expects that your data source contains the emailAddress column. Therefore, you should check the column name in the data source and match the Javascript code.

Please, send a request to our support email should you need further guidance.

Kindly,
Janis, eazyBI support