Home
Designing Analytics Reports
Missing comma separators and adding them back in
Migrateduser
<p>Good morning, all! I've run into a formatting dilemma that really has me scratching my head.... I've designed a line chart that pulls in values from a table and the 'Use 1000s separator' box is checked in the 'Format Number' area. In the chart, I have the 'Mouse Over' set to display the value pulled in from the table, along with a date also passed from the table. For the life of me, I can not get the value to display with commas. Here are three ways I've tried in the Expression Builder to fix the issue (none have worked):</p>
<p> </p>
<p><strong>1. (x.toLocaleString('en-US', { style: 'currency', currency: 'USD' }))</strong></p>
<p> </p>
<p><strong>2. function numberWithCommas(x) {</strong></p>
<div><strong> return x.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',');</strong></div>
<div><strong> }</strong></div>
<div> </div>
<div><strong>3. x.toLocaleString()</strong></div>
<div> </div>
<div>Any ideas? It's not a huge matter to most users, but now it's become a personal battle for me..... I <em><strong>WILL </strong></em>have comma separators...... Of course, it's probably some little thing I've overlooked, and will feel rather dumb when it's pointed out.</div>
<div> </div>
<div>As always, thanks in advance for any help provided!</div>
<div> </div>
<div>Have a great day!</div>
<div> </div>
<div>Scott</div>
Find more posts tagged with
Comments
There are no comments yet