Splunk Search

How to add Currency Symbol ($ dollar sign) to a column with numbers?

tdunphy_
Explorer

Hi all,

I have a column in splunk that I want to use to show totals. I would like for the dollar sign ($) to appear before the numbers in the totals column.

Here's my query:

index=prd_aws_billing (source="/*2017-12.csv") LinkedAccountId="123456678" ProductName="Amazon Elastic Compute Cloud" | stats sum(UnBlendedCost) AS Cost by ResourceId,UsageType,user_Name,user_Engagement

How do I get the numbers in the UnBlendedCost column to appear with a dollar sign in front of them?

Thanks

0 Karma
1 Solution

livehybrid
Builder

Hi,
Try this:

index=prd_aws_billing (source="/*2017-12.csv") LinkedAccountId="123456678" ProductName="Amazon Elastic Compute Cloud" | stats sum(UnBlendedCost) AS Cost by ResourceId,UsageType,user_Name,user_Engagement | fieldformat Cost="$".tostring(Cost)

View solution in original post

livehybrid
Builder

Hi,
Try this:

index=prd_aws_billing (source="/*2017-12.csv") LinkedAccountId="123456678" ProductName="Amazon Elastic Compute Cloud" | stats sum(UnBlendedCost) AS Cost by ResourceId,UsageType,user_Name,user_Engagement | fieldformat Cost="$".tostring(Cost)

tdunphy_
Explorer

That's perfect. Thank you!

0 Karma
Get Updates on the Splunk Community!

Index This | I am a number, but when you add ‘G’ to me, I go away. What number am I?

March 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with another ...

What’s New in Splunk App for PCI Compliance 5.3.1?

The Splunk App for PCI Compliance allows customers to extend the power of their existing Splunk solution with ...

Extending Observability Content to Splunk Cloud

Register to join us !   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to ...