Latest value

I have a dataset containing the below values
Date,ColA, ColB, values

I want to create a table visual with a date range filter, grouped by ColA and Colb with the latest values. I tried last_value but it expects date to be in the table else it throws as error. Any help?

Hello @samiel123, welcome to the QuickSight community! I’d say you have 2 different options to filter by the dates while excluding them from the visual. If you are using a table, you can add the date column to the table and from the field well dropdown you can select “Hide” on that column.

Another option would be to create 2 calculated fields containing ifelse statements. This works great just make sure your date filters are set as parameter created controls (linking documentation here). You will need default values set for the parameters so you can use them in a calculated field. Then make an ifelse statement like this:

ifelse({Date} >= ${StartDate} AND {Date} <= ${EndDate}, {ColA}, NULL)

Make another calculated field exactly the same way but witch ColA for ColB. I hope that helps!