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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

Reply
Lili123
Regular Visitor

Conversion format as number

Dear all,

My data source is SQL, and I have a column that contains only numbers (no empty data nor letter, etc). The format is not automatically recognized as numbers. I would like to transform the column as number, but I have the message (sorry it's a translation of the original message, I might not be the right one) : 

"this step generates a query that is not supported in directquery mode "

 

 Can somebody help me to transform the data, please ?

Thanks a lot.

Regards

1 ACCEPTED SOLUTION
v-eqin-msft
Community Support
Community Support

Hi @Lili123 ,

 

  • Yes, changing data type is not avilable in Power Query Editor for Direct Query mode.
  1. You could successfully change it in Column Tools tab, but please notice the risk dialog:

Eyelyn9_0-1652334763137.png

    2. Or switch the mode to Import mode instead.

Eyelyn9_1-1652335109892.png

 

  • Or if you have a sql source, you may make this transformation directly on the data source.
  • In addition, here is a workaround by using NativeQuery that you could have a try:

Eyelyn9_3-1652335192746.png

 

For more information, please kindly refer to:

Using DirectQuery in Power BI - Power BI | Microsoft Docs

 

 

Best Regards,
Eyelyn Qin
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

4 REPLIES 4
v-eqin-msft
Community Support
Community Support

Hi @Lili123 ,

 

  • Yes, changing data type is not avilable in Power Query Editor for Direct Query mode.
  1. You could successfully change it in Column Tools tab, but please notice the risk dialog:

Eyelyn9_0-1652334763137.png

    2. Or switch the mode to Import mode instead.

Eyelyn9_1-1652335109892.png

 

  • Or if you have a sql source, you may make this transformation directly on the data source.
  • In addition, here is a workaround by using NativeQuery that you could have a try:

Eyelyn9_3-1652335192746.png

 

For more information, please kindly refer to:

Using DirectQuery in Power BI - Power BI | Microsoft Docs

 

 

Best Regards,
Eyelyn Qin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Thank you for your very well documented answer. It works properly!

watkinnc
Super User
Super User

Assuming you are using Table.TransformColumnTypes, try:


Table.TransformColumns(PriorStepOrTableName, {{"NumberColumnName", Number.From, type number}})


You might have to use each Number.From

 

--Nate

 


I’m usually answering from my phone, which means the results are visualized only in my mind. You’ll need to use my answer to know that it works—but it will work!!

Hi Watkinnc, 

I put this in the querry, sorry, but I still have the same error message. Thank you anyway.

Do you have another idea ?

 

Helpful resources

Announcements
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

Power BI Carousel June 2024

Power BI Monthly Update - June 2024

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

RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

Top Solution Authors
Top Kudoed Authors