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!

Webinar Recap | Revolutionizing IT Operations: The Transformative Power of AI and ML ...

The Transformative Power of AI and ML in Enhancing Observability   In the realm of IT operations, the ...

.conf24 | Registration Open!

Hello, hello! I come bearing good news: Registration for .conf24 is now open!   conf is Splunk’s rad annual ...

ICYMI - Check out the latest releases of Splunk Edge Processor

Splunk is pleased to announce the latest enhancements to Splunk Edge Processor.  HEC Receiver authorization ...