cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Frequent Visitor

query folding and change of column data type

Hello,

 

I need to concatenate numeric columns in my table using Add.Column, like:

 

= Table.AddColumn(Custom1, "UniqueID", each (Text.From([CaseID])&Text.From([SolutionID])), Int64.Type)

 

I thought using the "Int64.Type" at the end of the step should format the new column as whole number automatically, however it seems that they are just recognized as text. When I then manually convert the column to "whole number" query folding doesn't happen anymore. Is there an error on my side or a workaround to ahve query folding happen even after a column data type is changed?

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Super User I
Super User I

if I understand the language specification correctly Type.Int64 is just an extension of type number. See here:

https://docs.microsoft.com/en-us/powerquery-m/power-query-m-language-specification, (see page 46):

The M type system consists of the following kinds of types:
• Primitive types, which classify primitive values (binary, date, datetime,
datetimezone, duration, list, logical, null, number, record, text, time, type)
and also include a number of abstract types (function, table, any, and none)

I would try using 'type number' instead of Type.Int64, hopefully it works (it may be limitation of Direct Query though, which I assume you are using, since you mentioned folding).. You can then change format in DAX separately from the type



Did I answer your question? Mark my post as a solution!
Thank you for the kudos 🙂

Proud to be a Super User!

View solution in original post

2 REPLIES 2
Highlighted
Super User I
Super User I

if I understand the language specification correctly Type.Int64 is just an extension of type number. See here:

https://docs.microsoft.com/en-us/powerquery-m/power-query-m-language-specification, (see page 46):

The M type system consists of the following kinds of types:
• Primitive types, which classify primitive values (binary, date, datetime,
datetimezone, duration, list, logical, null, number, record, text, time, type)
and also include a number of abstract types (function, table, any, and none)

I would try using 'type number' instead of Type.Int64, hopefully it works (it may be limitation of Direct Query though, which I assume you are using, since you mentioned folding).. You can then change format in DAX separately from the type



Did I answer your question? Mark my post as a solution!
Thank you for the kudos 🙂

Proud to be a Super User!

View solution in original post

Highlighted
Frequent Visitor

Thanks, luckily that was an easy fix for my issue!

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Community Conference

Microsoft Power Platform Communities

Check out the Winners!

secondImage

Create an end-to-end data and analytics solution

Learn how Power BI works with the latest Azure data and analytics innovations at the digital event with Microsoft CEO Satya Nadella.

Top Solution Authors
Top Kudoed Authors