Insights (order by absolute values, display original values)

Looking for a quicksight “Insight” suggestion, how can I display top 3 carriers based on “ABSOLUTE” Month over month value, but display that carriers ORIGINAL month over month value?

E.g.
Top 3 carriers for Manifest are:
DAMCO with -2million
MAERSK with -1million
CMA with 0.5 million

(Keep in mind that the values can be positive or negative so I’ll create another calculated field that gives me the absolute values for these carriers, however sorting them by the absolute value is challenging if i want to display the original value on the insight)

Any help/suggestions will be appreciated! Thanks

Hello @A_A, welcome to the QuickSight community!

I worked through some calculations to make this work 2 different ways. The key issue here is I needed to custom write some periodOverPeriod calculations so we can display the correct values without referencing all of the fields.

Some quick info on that:
When using the periodOverPeriodDifference aggregation, all of the fields used inside of the function have to be referenceable for the calculation to work. This gives us errors in an insight because it can only reference the date and value or the carrier and value. That means I need to make LAC-W aggregations using PRE_AGG or PRE_FILTER aggregation levels. This allows you to reference fields that are not present in your visual.

Now, I created 2 different versions of the solution in this Arena analysis:
Insights (order by absolute values, display original values)

The left side displays a static date option where it will always reference the last month and current month. This will update whenever we enter a new month but it does not allow for users to filter the dates.

The right side allows the user to select 2 different months and run the comparison calculations against them. The months also do not need to be one after the other.

This should provide you with your desired output but let me know if you have any questions!