Skip to main content
Announcements
Customer Spotlight: Discover what’s possible with embedded analytics Oct. 16 at 10:00 AM ET: REGISTER NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
schivet
Contributor III
Contributor III

Rounding Financial data

Hi,

Sometime you have financial data with more than two digits after the coma .... yes this is happening in my company.

If you want to round it to two digit, easy, just use the fonction:

  Round ([Amount],0.01)

But you might have to cancel this financial data, yes you can..

In this case you might have a problem because the rounding will be do this way:

Amount+Must beRound([Amount+],0.01)round([Amount-],0.01)
450.3850450.39450,3900-450,3800
1050.56501050.571 050,5700-1 050,5600
11691.681411691.6811 691,6800-11 691,6800

This is mathematique but not compatible with my need.

The only solution I found was this one:

  if (Amount>0 , round(Amount,0.01), -round(-Amount,0.01)) as Amount

Stéphane

6 Replies
shree909
Partner - Specialist II
Partner - Specialist II

Hi can u try this

 

replace

(round([Amount+]

,0.01),',',.)

After using this in the expression , on the number tab of the chart use expression as default..

this will work..

schivet
Contributor III
Contributor III
Author

Hello,

No sorry your solution is not working:

Image 2012-12-13 004.jpg

shree909
Partner - Specialist II
Partner - Specialist II

Hi i tried for the first expression and its showing up right values which  it must be..round.bmp

Did u change the number format to expression default.....????????

schivet
Contributor III
Contributor III
Author

Can't see the print screens...

But I confirm that it's not working with [Amount-] (last column)

Amount+   Must be Round([Amount+],0.01)round([Amount-],0.01)Round([Amount+],0.01)-(round(-[Amount-],0.01))replace(round([Amount+],0.01),',',.)replace(round([Amount-],0.01),',',.) 
450.3850450.39450,3900-450,3800450,3900-450,3900450,3900-450,3800 
1050.56501050.571050,5700-1050,56001050,5700-1050,57001050,5700-1050,5600 
11691.681411691.6811691,6800-11691,680011691,6800-11691,680011691,6800-11691,6800
shree909
Partner - Specialist II
Partner - Specialist II

Amount+Must bereplace(Round([Amount+],0.01),',',.)replace(round([Amount-],0.01),',',.)replace(Ceil([Amount+],0.01),',',.)replace(Floor([Amount-],0.01),',',.)replace(Round([Amount+],0.01),',',.)-replace((round(-[Amount-],0.01)),',',.)
450.3850450.39450.39-450.38450.39-450.39450.39-450.39
1050.56501050.571050.57-1050.561050.57-1050.571050.57-1050.57
11691.681411691.6811691.68-11691.6811691.69-11691.6911691.68-11691.68
No selections
schivet
Contributor III
Contributor III
Author

Good try but replace(Ceil([Amount+],0.01) will not work fro the last value:

it should be 11691.68 and not 11691.69 

  if (Amount>0 , round(Amount,0.01), -round(-Amount,0.01)) as Amount is the solution