Use calculated field ('firstValue' ) from dataset in table visual as column without adding all fields from calculated field in field wells


I am trying to add a calculated field to my table visual. The calculated field uses ‘firstValue’ (firstValue(ResponseTime, [TimeSent DESC])). I cannot add ResponseTime or TimeSent to the field wells of the table as this renders the data incorrectly, but without these i get the error “Table Calculation attributes reference(s) are missing in field wells”. I have already tried moving the calculated field to the data set as mentioned in this post ('firstValue' of a dimension sorted by timestamp and partitioned by another dimension), but i get the same error about the missing attributes in field wells.

Is there a way to actually use a calculated field in a table without adding each field used to calculate it to the field wells?

The goal is to add a column to this table that is LatestResponseTime to show the latest value for each row. If there is a better way to go about this than adding a calculated field i am open to that as well.

Hello @valerie.hall, welcome to the QuickSight Community! I think you have 2 options here to solve the problem. In regards to the point you made about adding the calculated field into the dataset, did you create a calculated field on the dataset layer or did you add the function into your SQL query? If you build out the column in your SQL, that error should no longer be a problem in QuickSight.

You other option would be to nest it in an ifelse statement like what was mentioned on this thread. They use a maxOver function in the example, but that should also work with the firstValue function you are utilizing.

Either of those options should give you the solution you are expecting!