Reporting

How to format numbers in scheduled email report?

rkelsey
New Member

In my scheduled report, we have numbers in the range of 382 to 6,875. I can get the numbers to align properly in the UI display, but the scheduled report aligns the 6,875 to the left and the value 382 to the right margin. I know that the reason for this is that the 6,875 is treated as a string with the comma inserted. But, I have also tried to append a space in front of the shorter number, but it doesn't align correctly.

This is what I have tried -
| eval num_records=" " + tostring(num_records,"commas")

I have tried using fieldformat after the table command, but it wasn't displaying correctly in the PDF.

I also tried using the | eval tot_records=printf("%'*d", 7, num_records) Using this one, I can't get it to pad to the correct number of digits AND use the thousands separator. Is there a way to do both?

This is what I'm seeing now.

alt text

This is the way that I would prefer to see it. alt text

Labels (1)
0 Karma

CutieHoney
Observer

I have this same question.  Is there a way to do this?

0 Karma

ITWhisperer
SplunkTrust
SplunkTrust

@CutieHoney  Please post your specific question as a new question, with details of your usecase.

0 Karma
Get Updates on the Splunk Community!

Announcing Scheduled Export GA for Dashboard Studio

We're excited to announce the general availability of Scheduled Export for Dashboard Studio. Starting in ...

Extending Observability Content to Splunk Cloud

Watch Now!   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to leverage ...

More Control Over Your Monitoring Costs with Archived Metrics GA in US-AWS!

What if there was a way you could keep all the metrics data you need while saving on storage costs?This is now ...