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!

Splunk + ThousandEyes: Correlate frontend, app, and network data to troubleshoot ...

 Are you tired of troubleshooting delays caused by siloed frontend, application, and network data? We've got a ...

Splunk Observability for AI

Don’t miss out on an exciting Tech Talk on Splunk Observability for AI!Discover how Splunk’s agentic AI ...

🔐 Trust at Every Hop: How mTLS in Splunk Enterprise 10.0 Makes Security Simpler

From Idea to Implementation: Why Splunk Built mTLS into Splunk Enterprise 10.0  mTLS wasn’t just a checkbox ...