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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
Nosh10
Helper II
Helper II

Integer not Converting to Decimal

Whole Number to Decimal.GIFHello, 

 

I have a file, and one of the columns has decimal points. However, Power BI uploaded the column as a whole number. I changed the column in the data tab to reflect a decimal number, but nothing changed. Please see attached. 

 

 

1 ACCEPTED SOLUTION

I solved the issue. I needed to update the data in the advanced editor. 

View solution in original post

10 REPLIES 10
Syndicate_Admin
Administrator
Administrator

Hi @Nosh10 ,

It looks like you've changed the data type and adjusted the number of decimal places on the power bi desktop, it looks normal.

decimal.png

Do you mean it doesn't work in the filter like the yellow part?

If so, when the initial data is 1,2,3.. , even if you change the data type as a decimal number, it will not be reflected in the power query editor and the data view filter. However, you can see the 1.0, 2.0, 3.0 ... in the slicer visual.

data view filter.pngData view filter will not reflect the initial 1 as 1.0slicer.pngcutter can do it

Best looks,
Yingjie Li

If this post helps, please consider Accepting it as the solution to help other members find it more quickly.

v-yingjl
Community Support
Community Support

Hi @Nosh10 ,

It seems like you have changed the data type and adjusted the number of decimal places in power bi desktop, it looks like normal.

decimal.png

Did you mean it not work in the filter like the yellow part?

If so, when the initial data is 1,2,3.. , even if you change the data type as decimal number, it will not reflect in power query editor and data view filter. However, you can see the 1.0, 2.0, 3.0 ... in the slicer visual.

data view filter will not reflect the initial 1 as 1.0data view filter will not reflect the initial 1 as 1.0slicer can do itslicer can do it

Best Regards,
Yingjie Li

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

I solved the issue. I needed to update the data in the advanced editor. 

Nosh10
Helper II
Helper II

query editor.GIF

camargos88
Community Champion
Community Champion

Hi @Nosh10 ,

 

Check on Query Editor the steps converting data types, perhaps it's converting there. If yes, just change the type.



Did I answer your question? Mark my post as a solution!

Proud to be a Super User!



Hi! Thanks. I changed the data type in the query editor as well, and no luck. Can you provide any work arounds?

Hi @Nosh10 ,

 

Can you share the pbix ? If no, take a print of Query Editor, to check the applied steps.



Did I answer your question? Mark my post as a solution!

Proud to be a Super User!



Please see below for view of query editor

@Nosh10 , Right-Click on the table, you will see Advanced Editor option. You will see a text like this

 

let
Source = Excel.Workbook(File.Contents("...bi\decimal.xlsx"), null, true),
Sheet1_Sheet = Source{[Item="Sheet1",Kind="Sheet"]}[Data],
#"Promoted Headers" = Table.PromoteHeaders(Sheet1_Sheet, [PromoteAllScalars=true]),
#"Changed Type" = Table.TransformColumnTypes(#"Promoted Headers",{{"Number", type number}, {"Number1", type number}, {"Name", type text}})
in
#"Changed Type"

 

You will see {"Order No", Int64.Type} replace with that {"Order No", type number},

@Nosh10 can you make sure that once you changed the column to decimal number, make sure decimal point value is not zero, make it 1 or 2, depending on your needs:

 

image.png

 

I would  Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos whoever helped to solve your problem. It is a token of appreciation!



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.

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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