I’d like to know how to handle errors in computation when there is no data to compute. For example, I have a Period Over Period computation defined as:
The thing is that when there is no data for a previous/current period the narrative throws an error and the visual prompts a QS message. I’m aiming to handle this scenario so I can display a custom error message.
The error that I got in my narrative definition windows is: NO DATA {6bd80b84-7c4c-4f6f-b57a-f5835e3d82f0}.currentTimeValue.formattedValue
Hello @Julian, welcome to the Quicksight community!
Have you tried adding an if statement in the inline text that says:
If {value field} = "NULL" OR ' ' OR 0, "No Data for Visual"
Basically, telling the inline to add a condition that says if there is an empty string or Null for a value that it should return “No Data” or whatever you want your user to see. To make that work you will need use the formatted fields from your computations.
I think that the way the insight is aggregating this may be difficult to trick to be able to get the error message to pop up rather than a custom message from a conditional statement.
Did you create the conditional statement in the narrative editor or as a calculated field on the data prep or analysis layer?
Were you able to find a solution for this or are you still running into this issue? Also, did you try making this in the narrative editor or as a calculated field on the data prep or analysis layer?