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
smpa01
Super User
Super User

The number is out of range of a 32 bit integer value

Hi,

 

I am getting an error when I am trying to run the following code. I am trying the code to generate what {1..5} would generate.

 

= {4615443880..4615443890}

ErrorError

I know from https://community.powerbi.com/t5/Desktop/Only-64-Bit-Data-Type-in-Data-Models/td-p/133635

that following are the range for different Int Category.

 

Int8: -256 - +255

Int16: -32,768 - +32,767

Int32: -2,147,483,648 – +2,147,483,647

Int64: -9,223,372,036,854,775,808 - +9,223,372,036,854,775,807

 

As per the above 4615443880 is indeed out of 32 bit range.

 

However, I also tried the following but the error remained same.

= {Int64.From(4615443880)..Int64.From(4615443890)}
let
    Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WMjEzNDUxMbawMFDSgXMsDZRiYwE=", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type text) meta [Serialized.Text = true]) in type table [Column1 = _t, Column2 = _t]),
    #"Changed Type" = Table.TransformColumnTypes(Source,{{"Column1", Int64.Type}, {"Column2", Int64.Type}}),
    #"Added Custom" = Table.AddColumn(#"Changed Type", "Custom", each {[Column1]..[Column2]})
in
    #"Added Custom"

Does anyone know what is the work around for this? Does Power Query list only generate values between 32 bit integers?

 

Appreciate any help. Thank you in advance.

Did I answer your question? Mark my post as a solution!
Proud to be a Super User!
My custom visualization projects
Plotting Live Sound: Viz1
Beautiful News:Viz1, Viz2, Viz3
Visual Capitalist: Working Hrs
1 ACCEPTED SOLUTION

Hi @smpa01 ,

Based on my test, you could use List.Numbers function:https://docs.microsoft.com/en-us/powerquery-m/list-numbers

Result:

1.PNG

 

Regards,

Daniel He

 

Community Support Team _ Daniel He
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

5 REPLIES 5
v-danhe-msft
Employee
Employee

Hi @smpa01 ,

Based on my test, you could use GENERATESERIES function:

https://docs.microsoft.com/en-us/dax/generateseries-function

Table = GENERATESERIES(4615443880,4615443890)

Result:

1.PNG

Regards,

Daniel He

Community Support Team _ Daniel He
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

@v-danhe-msftthank you very much for your reply.

 

Can the same be replicated using M and not DAX? I am looking for a M solution to the problem.

Did I answer your question? Mark my post as a solution!
Proud to be a Super User!
My custom visualization projects
Plotting Live Sound: Viz1
Beautiful News:Viz1, Viz2, Viz3
Visual Capitalist: Working Hrs

Hi @smpa01 ,

Based on my test, you could use List.Numbers function:https://docs.microsoft.com/en-us/powerquery-m/list-numbers

Result:

1.PNG

 

Regards,

Daniel He

 

Community Support Team _ Daniel He
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
Not applicable

Source = Salesforce.Reports(),
    #"00O2p000008qsHmEAI" = Source{[Name="00O2p000008qsHmEAI"]}[Data],
    
      #"Added Custom" = Table.AddColumn(#"00O2p000008qsHmEAI", "Custom", each {List.Numbers(1,10)})
 
in
     #"Added Custom"
 
 

Expression error : The number is out of range of 32 bit integer value Details: 24.69063222

 
 
 

Hello @v-danhe-msft 

 

This is amazing. It has worked. Thank you very much. Awesome way to tackle this 32 bit integer limitation.

Did I answer your question? Mark my post as a solution!
Proud to be a Super User!
My custom visualization projects
Plotting Live Sound: Viz1
Beautiful News:Viz1, Viz2, Viz3
Visual Capitalist: Working Hrs

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.

Top Solution Authors