ToString Issues


I’ve been using ToString throughout a dashboard I’ve been building, I’ve been working on this for the last couple months and recently started getting problems when building out a calculated field using ToString. Before it correctly output the numeric value as a text, but now it only puts out a 1 or 0. Can this be resolved?

Hi @Matthew_Payne can you share the formula you are using? Im not aware of any changes to the toString function.

This is the formula that is in the picture above, the test round column. toString({cppu_fc}).

The formulas below are the ones I’ve been using the last couple months without any problems.


My hunch is that you have the toString field in a Values field well, and it is probably counting it rather than showing the actual string value. Can you try putting it in Group By (or Rows/Columns if using a pivot table)? Essentially a blue field well instead of a green one.

I dont see anything wrong with your formulas themselves.

If still not working, maybe you can tell me more about what you are trying to achieve in general - seems like it is some sort of rounding or splitting the integer from the decimal - maybe there is another way to do it.

I’m seeing that now. Its showing (Count) within the values section in the pivot where every else where within my pivots its showing (Custom). I tried putting it within other Pivots to see if that fixes it, it won’t. I only have the option for Count and Count Distinct. Is there a way to force a change to (Custom)?

Custom is more for when you have already defined the aggregation in the formula itself like sum(sales). I wouldn’t expect it to show custom aggregation on the formulas you shares so far. Can you move it to Rows or Columns in your pivot?

It looks like summing it up within the formula before the ToString resolved the issue. I’ll continue to test it and let you know if I have any problems with it. Thanks!

Oh if cppu_fc is a calculated field that has some aggregation already built in, then maybe that is causing your second calc to have ‘custom’ aggregation.

If you cant figure it out maybe we can take a step back and tell me what you want to accomplish in more broad terms and we can think of a different solution. For now Ill close this post out, but feel free to reopen later.