/    /  Amazon QuickSight – Ln

Amazon QuickSight – Ln

 

The ln() function in Amazon QuickSight is used to calculate the natural logarithm of a numeric expression.

 

Syntax

#Start#
ln(expression)
#End#

 

This function takes one argument

 

  • expression: This is the numeric expression whose natural logarithm is to be calculated.

 

Suppose we have a dataset that contains information about the revenue generated by a company over the last five years. We can use the ln() function in Amazon QuickSight to calculate the natural logarithm of the revenue data.

 

To calculate the natural logarithm of the revenue data, we can create a new calculated field in Amazon QuickSight with the following expression:

 

Example

#Start#
ln(revenue)
#End#

 

This expression will calculate the natural logarithm of the revenue column in our dataset.

For instance, if our revenue data is as follows:

YearRevenue
2017100000
2018150000
2019200000
2020250000
2021300000

 

Then, the natural logarithm of the revenue data will be:

YearRevenueln(Revenue)
201710000011.51292546
201815000011.91839057
201920000012.20607265
202025000012.4292162
202130000012.61153893

 

In this example, we can see that the natural logarithm of the revenue data increases as the revenue increases.