Forum Discussion

Mengerdahl's avatar
Mengerdahl
Frequent Visitor
2 years ago
Solved

Error when changing text to number

Hi!

I am really new to PowerBI and im just trying to learn the basics for now. But I got stuck almost instantly...

Im using this dataset from Kaggle with orderdata. What I want to do is begin to build some basic visualisations on orderdata and profit. 

 

As I tried to build the visualization It didnt show any data. I redid everything and realized that the columns I want to work with are set as text values and not numerical. 

 

I try to change this under "transform" but I get a error. I suspect that it inteprets the data as text because of the .0 after each number. Im not sure why it is adding this and tried several data sets with the same outcome. So probably a settings question I dont understand... 

 

Anybody have a idea on how to proceed here? 🙂 

 

 

 

  • Mengerdahl 

     

    replace .0 with blank for all columns then try to convert into nbumbers .

    you need to select a column then you can find replace under the transform section. 

     

     

     

     

     

     

    this should work .

     

     

     

     

    If my answer helped sort things out for you, i would appreciate a thumbs up 👍 and mark it as the solution ✅
    It makes a difference and might help someone else too. Thanks for spreading the good vibes! 🤠

5 Replies

  • Daniel29195's avatar
    Daniel29195
    Community Champion

    Mengerdahl 

    i downloaded the data and linked to power bi . it works fine . 

     

    ]

    can you please share the power file you are working on so i can take a closer look ? 

     

     

    • Mengerdahl's avatar
      Mengerdahl
      Frequent Visitor

      Thank you for lookign at this 🙂 

       

      Sure, I uploaded a file here. But its really just a powerBI file with the dataset linked. I have uninstalled and redid everything several times now but I have the same issue. 

      Looking at your file I see that it is not adding the .0 decimal to the numbers as it is in my file. Im pretty sure that is the problem here. 

      • Daniel29195's avatar
        Daniel29195
        Community Champion

        Mengerdahl 

         

        replace .0 with blank for all columns then try to convert into nbumbers .

        you need to select a column then you can find replace under the transform section. 

         

         

         

         

         

         

        this should work .

         

         

         

         

        If my answer helped sort things out for you, i would appreciate a thumbs up 👍 and mark it as the solution ✅
        It makes a difference and might help someone else too. Thanks for spreading the good vibes! 🤠

  • Mengerdahl's avatar
    Mengerdahl
    Frequent Visitor

    So I might have solved this actually. My theory is that im using PowerBI installed with swedish settings where a decimal is (,) and the dataset is formatted with american settings using (.) as a decimal. 

     

    I tried to transform a column by "using locale" and setting the settings so american (US). 

    And now I can use numerical values!