

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
How to round up the values in the expression ?
Hello,
I have Net_Risk_Position as a dimension in my table with values as shown below;
Net Risk Position |
---|
(R)44000 |
(R)91255.394516 |
(C)-79240 |
(R)4587.658936 |
(R)19875 |
How to write an expression to round up the values to 2 decimals as shown below;
Net Risk Position |
---|
(R)44000.00 |
(R)91255.39 |
(C)-79240.00 |
(R)4587.66 |
(R)19875.00 |
thanks
Bhavesh
Accepted Solutions


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Another way using Mid() function can be like
Left([Net Risk Position],3)&Num(Mid([Net Risk Position], Index([Net Risk Position],')')+1,Len([Net Risk Position])), '###0.00') AS NetPost


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Try this
LOAD Left([Net Risk Position],3)&Num(SubField([Net Risk Position],')',-1),'###.00') as [Net Risk Position];
LOAD * INLINE [
Net Risk Position
(R)44000
(R)91255.394516
(C)-79240
(R)4587.658936
(R)19875
];


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Another way using Mid() function can be like
Left([Net Risk Position],3)&Num(Mid([Net Risk Position], Index([Net Risk Position],')')+1,Len([Net Risk Position])), '###0.00') AS NetPost


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Perfect, that worked out for me. thank you


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
thank you for your response, but I have 2 million records to convert.
