cancel
Showing results for
Did you mean:
Highlighted
Regular Visitor

## Why do I get error message The result of a conversion or arithmetic is either too large or too small

Hi,

I have a bar chart displaying dates and phone queues on the horizontal axis, and Average Waiting Time duration in seconds in the value field, which is this calculation :

Waiting Time Average Duration = SUM(QueuesReport[Waiting Time Total Duration in seconds])/SUM(QueuesReport[Nb Answered])

Then I have another measure that displays the previous one, but as a string formatted like HH:MM:SS.

The problem is when I put this measure as a tooltips, I get the error "The result of a conversion or arithmetic is either too large or too small".

Do somone have any idea why I'm getting this error ?

Thank you very much !

3 REPLIES 3
Highlighted
Super User IV

## Re: Why do I get error message The result of a conversion or arithmetic is either too large or too s

@Benoitcoutu are you changing the format of this measure Waiting Time Average Duration to hh:mm:ss

Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

Highlighted
Regular Visitor

## Re: Why do I get error message The result of a conversion or arithmetic is either too large or too s

Hi @parry2k,

No I did not change the format to hh:mm:ss of Waiting Time Average Duration. This measure gives me decimal numbers when I place it in a simple card.

To get the value in hh:mm:ss format, I created another measure using Waiting Time Average Duration,  which is that one :

Waiting Time Average Duration (HH:MM:SS) =
// Duration formatting
// * Given a number of seconds; returns a format of "hh:mm:ss"
//
VAR Duration = [Waiting Time Average Duration]
// There are 3;600 seconds in an hour
VAR Hours =
INT ( Duration / 3600)
// There are 60 seconds in a minute
VAR Minutes =
INT ( MOD( Duration - ( Hours * 3600 );3600 ) / 60)
// Remaining seconds are the remainder of the seconds divided by 60 after subtracting out the hours
VAR Seconds =
ROUNDUP(MOD ( MOD( Duration - ( Hours * 3600 );3600 ); 60 );0) // We round up here to get a whole number
// These intermediate variables ensure that we have leading zero's concatenated onto single digits
VAR H =
IF ( LEN ( Hours ) = 1;
CONCATENATE ( "0"; Hours );
CONCATENATE ( ""; Hours )
)
VAR M =
IF (
LEN ( Minutes ) = 1;
CONCATENATE ( "0"; Minutes );
CONCATENATE ( ""; Minutes )
)
VAR S =
IF (
LEN ( Seconds ) = 1;
CONCATENATE ( "0"; Seconds );
CONCATENATE ( ""; Seconds )
)
// Now return hours; minutes and seconds with leading zeros in the proper format "hh:mm:ss"
RETURN
CONCATENATE (
H;
CONCATENATE ( ":"; CONCATENATE ( M; CONCATENATE ( ":"; S ) ) )
)

And then when I place this measure in the tooltips section, it throws the mentionned error.
Highlighted
Community Support

## Re: Why do I get error message The result of a conversion or arithmetic is either too large or too s

Hi @Benoitcoutu ,

Kindly share your sample data and excepted result to me if you don't have any Confidential Information. Please upload your files to One Drive and share the link here.

Community Support Team _ Frank
If this post helps, then please consider Accept it as the solution to help the others find it more quickly.

Announcements

#### August 2020 Community Challenge: Can You Solve These?

We're excited to announce our first cross-community 'Can You Solve These?' challenge!

#### Community Blog

Visit our Community Blog for articles, guides, and information created by fellow community members.

#### Upcoming Events

Wondering what events you could join or have an event to promote yourself? Check out our Upcoming Events.

#### Get Ready for Power BI Dev Camp

We are thrilled to announce we will begin running a monthly webinar series named Power BI Dev Camp.

Top Solution Authors
Top Kudoed Authors