cancel
Showing results for 
Search instead for 
Did you mean: 
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!






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
Vote for T-Shirt Design

Power BI T-Shirt Design Challenge 2023

Vote for your favorite t-shirt design now through March 28.

March 2023 Update3

Power BI March 2023 Update

Find out more about the March 2023 update.

March Events 2023A

March 2023 Events

Find out more about the online and in person events happening in March!

Top Solution Authors