We encountered an error trying to save your calculated field. Please try creating it again - Not sure why

hello all
I am encountering an issue while creating a calculated field in AWS Quick Sight that uses the minOver function. Despite following the documented syntax, I am unable to save the calculated field, and I receive the error message:

“We encountered an error trying to save your calculated field. Please try creating it again.”

Dataset Details:

  • I am working with a dataset that includes two fields:
    • name (String): Contains the branch name. Some rows have null values.
    • bi_parent_branch (String): A GUID used to group branches.

Steps Taken:

  1. Handled Null Values:
  • I created a calculated field named name_without_nulls using:
ifelse(isNull({name}), "Unknown", {name})
  • This calculated field works fine when added to a visual.
  1. Used minOver for Aggregation:
  • I attempted to create a calculated field named unique_branch using:
minOver({name_without_nulls}, [{bi_parent_branch}])
  • The purpose of this field is to retrieve the minimum branch name for each bi_parent_branch.
  1. Error Encountered:
  • When trying to save the unique_branch field, I get the following error:

“We encountered an error trying to save your calculated field. Please try creating it again.”

  1. Debugging Steps Taken:
  • Verified that name and bi_parent_branch are strings.
  • Ensured there are no null or unusual characters in the data.
  • Tested simpler versions of the formula:
    • minOver({name}, [{bi_parent_branch}])
    • minOver(ifelse(isNull({name}), "Unknown", {name}), [{bi_parent_branch}])
  • Created smaller datasets to test if data size was an issue.

Despite these efforts, the error persists.

Hi!

Few things that you can check to resolve this issue:

  • Try to pre-process your dataset to handle nulls beforehand in the name field before using it in Quicksight, then directly apply in the minOver function
  • Even though it seems like you have already done this, I would advise again to check for nulls and directly handle the nulls in the minOver calculation

If you are still having issues, I would recommend getting more information regarding this by:

  • Splitting the logic (this would at least isolate where the error is coming from and give you more information)
  • Trying to use other aggregation functions to see if this is only happening in minOver or other functions like maxOver

Hopefully this steers in you in the right direction/helps debug!

Best,

Arnav

2 Likes

Hi @Shai_Dayan

May be it is expecting a value to measure
minOver(count({name_without_nulls}), [{bi_parent_branch}])

Even then I am not sure what your objective is with this calculation. Can you explain your statement below a bit more

  • The purpose of this field is to retrieve the minimum branch name for each bi_parent_branch.

Hi @Shai_Dayan,
It’s been awhile since we last heard from you, did you have any additional questions regarding your initial post or were you able to find a work around?

If we do not hear back within the next 3 business days, I’ll close out this topic.

Thank you!

Hi @Shai_Dayan,
Since we haven’t heard back, I’ll go ahead and close out this topic. However, if you have any additional questions, feel free to create a new post in the community and link this discussion for relevant information if needed.

Thank you!