Expression for decimal type column

NCD
Silver 2
Silver 2

I want my decimal type column to show me the decimal digits only when that number has something in decimals. 

What would my expression be?

Solved Solved
0 8 210
1 ACCEPTED SOLUTION

8 REPLIES 8

[column] - FLOOR([column])

in formula?

I already have this in my formula, 

[ParentTable].[Column]*[Column]

How can I merge your expression and mine?

your expression - FLOOR(your expression)

That just made everything to 0.00

perhaps my explanation was bad;

โ€ข I want to multiple a column from my Parent table with a column in my current table.

โ€ข Some results will have a number like, 1.26 and I want them to show. But when my result is 1, I don't want it to be 1.00

 

This sounds a strange request, but I think the only way this will be possible is to have the column as text. Then you could use various text functions to get the data displayed the way you want it. One immediate drawback I can think of though, if the values are shown as text then they won't sort correctly, bit perhaps that doesn't matter for your use case.

As for the text handling expression, something like this would work:

substitute(
  text( [ParentTable].[Column]*[Column] ),
  ".00",
  ""
)

Exactly my thought.

Perhaps as a workaround if the use case allows, you can create a VC with the formatted text for display purpose only and use the original numeric col  for calculations..

@graham_howe & @TeeSee1 

Thank you.

Guess it's just better to round it up, then!

what would the expression be if I wanted to round everything up even if it's 1.1 to 2?

Top Labels in this Space