Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
7 years ago
Solved

Sort Columns using Live Connection

I am working with a database live connection and I am trying to sort the columns from 1-12. However, PowerBI is not recognizing the right data type and it is ordering as 1,11,12, 2, 3, 4 ......9 

 

Is there a way to fix this issue?

 

 

 

 

  • Anonymous's avatar
    Anonymous
    7 years ago

    I understand the issue no. With live connection I don't think there is much modeling available, so everything needs to be handled in the data source. 

     

    Make sure the data type is correct in your data source. You may try cleaning the column too, make sure there are no text values or blanks in that column. 

     

    Thanks,

    Lakshmi

6 Replies

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi Anonymous,

     

    Did you try changing the data type of that column from text to whole number? You can do so from either Modeling tab on data view or transform tab while editing the query.

     

    -Lakshmi

    • Anonymous's avatar
      Anonymous
      Not applicable

      Thanks for your quick response Anonymous. I tried to change the data type, but I am not able to do it. Since it is a live connection from a database that I do not control, I am not able to make any changes. Is there another way to bypass this problem?

      • Anonymous's avatar
        Anonymous
        Not applicable

        I understand the issue no. With live connection I don't think there is much modeling available, so everything needs to be handled in the data source. 

         

        Make sure the data type is correct in your data source. You may try cleaning the column too, make sure there are no text values or blanks in that column. 

         

        Thanks,

        Lakshmi