Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Benoitcoutu
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
v-frfei-msft
Community Support
Community Support

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.
parry2k
Super User
Super User

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



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

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"
//
// We start with a duration in number of seconds
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
// Hours with leading zeros
VAR H =
    IF ( LEN ( Hours ) = 1;
        CONCATENATE ( "0"; Hours );
        CONCATENATE ( ""; Hours )
      )
// Minutes with leading zeros
VAR M =
    IF (
        LEN ( Minutes ) = 1;
        CONCATENATE ( "0"; Minutes );
        CONCATENATE ( ""; Minutes )
    )
// Seconds with leading zeros
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.Chart.png

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.