Line chart - Top 10 using last data point

Hello,

I am using a line chart with cost on the Y axis and time (month) on the X axis.
I am using the Top 10 filter, but I believe the visual filters the top 10 based on the sum of the whole period. I would like to have the top 10 based on the last month of the period.
Is there a way to achieve this?

Cheers.

Hi!

To do this I would suggest using Quicksight’s calculated fields and creating/applying a filter based on this calculated field.

Your calculated field would look something like:

ifElse({date} = maxOver({date}, [{date}]), 1, 0)

then you can add a filter for this field and apply it to your line chart!

Hope this helps!

Thanks, that’s exactly what I ended up doing:

ifelse( (extract('YYYY', {billing_period}) = extract('YYYY', now())) AND extract('MM', {billing_period}) = (extract('MM', now()) -1) , {Cost_Amortized}, 0)