Power query - turning number strings into numbers while preserving text





.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ height:90px;width:728px;box-sizing:border-box;
}







0















I have a set of data:



1

2

3

Infinity

4

5



The numbers are registered as strings inside of power query for some reason.



I'd like to convert the numbers to the percentage type (Or any other type really, depending on my needs), while preserving any text present.



I wish that I wasn't given mixed string-data columns (And the source of the string in the first place is replacing a div0! error), but we all work with what we have >_<



I've tried using the type converter inside of power query, but it overwrites the text with a null.



(Interestingly, since the text is "Infinity", it displays the infinity symbol inside of the power query window... it just doesn't load the symbol)










share|improve this question





























    0















    I have a set of data:



    1

    2

    3

    Infinity

    4

    5



    The numbers are registered as strings inside of power query for some reason.



    I'd like to convert the numbers to the percentage type (Or any other type really, depending on my needs), while preserving any text present.



    I wish that I wasn't given mixed string-data columns (And the source of the string in the first place is replacing a div0! error), but we all work with what we have >_<



    I've tried using the type converter inside of power query, but it overwrites the text with a null.



    (Interestingly, since the text is "Infinity", it displays the infinity symbol inside of the power query window... it just doesn't load the symbol)










    share|improve this question

























      0












      0








      0








      I have a set of data:



      1

      2

      3

      Infinity

      4

      5



      The numbers are registered as strings inside of power query for some reason.



      I'd like to convert the numbers to the percentage type (Or any other type really, depending on my needs), while preserving any text present.



      I wish that I wasn't given mixed string-data columns (And the source of the string in the first place is replacing a div0! error), but we all work with what we have >_<



      I've tried using the type converter inside of power query, but it overwrites the text with a null.



      (Interestingly, since the text is "Infinity", it displays the infinity symbol inside of the power query window... it just doesn't load the symbol)










      share|improve this question














      I have a set of data:



      1

      2

      3

      Infinity

      4

      5



      The numbers are registered as strings inside of power query for some reason.



      I'd like to convert the numbers to the percentage type (Or any other type really, depending on my needs), while preserving any text present.



      I wish that I wasn't given mixed string-data columns (And the source of the string in the first place is replacing a div0! error), but we all work with what we have >_<



      I've tried using the type converter inside of power query, but it overwrites the text with a null.



      (Interestingly, since the text is "Infinity", it displays the infinity symbol inside of the power query window... it just doesn't load the symbol)







      microsoft-excel power-query






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Feb 11 at 18:34









      SelkieSelkie

      234116




      234116






















          1 Answer
          1






          active

          oldest

          votes


















          0














          I would use Duplicate Column (from the Add Column ribbon) to make a copy of the column so you can preserve it as entered. Then I would Change the duplicated column's data type to Percentage. That way you can meet all requirements.






          share|improve this answer
























          • While it technically meets the requirements, it's not very useable for the end-users - one column has %, the other has the % as unreadable numbers and strings.

            – Selkie
            Feb 14 at 17:37











          • I'd be keen to learn about alternatives that would be more useable.

            – Mike Honey
            Feb 14 at 23:04











          • Yeah, my 'solution' will be extremely unsatisfying to anyone finding this question - I convinced the powers that be to let it default into a null, then have a calculated column flag indicate it. Fairly similar to your solution

            – Selkie
            Feb 14 at 23:27












          Your Answer








          StackExchange.ready(function() {
          var channelOptions = {
          tags: "".split(" "),
          id: "3"
          };
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function() {
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled) {
          StackExchange.using("snippets", function() {
          createEditor();
          });
          }
          else {
          createEditor();
          }
          });

          function createEditor() {
          StackExchange.prepareEditor({
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: true,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          imageUploader: {
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          },
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          });


          }
          });














          draft saved

          draft discarded


















          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1404543%2fpower-query-turning-number-strings-into-numbers-while-preserving-text%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown

























          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes









          0














          I would use Duplicate Column (from the Add Column ribbon) to make a copy of the column so you can preserve it as entered. Then I would Change the duplicated column's data type to Percentage. That way you can meet all requirements.






          share|improve this answer
























          • While it technically meets the requirements, it's not very useable for the end-users - one column has %, the other has the % as unreadable numbers and strings.

            – Selkie
            Feb 14 at 17:37











          • I'd be keen to learn about alternatives that would be more useable.

            – Mike Honey
            Feb 14 at 23:04











          • Yeah, my 'solution' will be extremely unsatisfying to anyone finding this question - I convinced the powers that be to let it default into a null, then have a calculated column flag indicate it. Fairly similar to your solution

            – Selkie
            Feb 14 at 23:27
















          0














          I would use Duplicate Column (from the Add Column ribbon) to make a copy of the column so you can preserve it as entered. Then I would Change the duplicated column's data type to Percentage. That way you can meet all requirements.






          share|improve this answer
























          • While it technically meets the requirements, it's not very useable for the end-users - one column has %, the other has the % as unreadable numbers and strings.

            – Selkie
            Feb 14 at 17:37











          • I'd be keen to learn about alternatives that would be more useable.

            – Mike Honey
            Feb 14 at 23:04











          • Yeah, my 'solution' will be extremely unsatisfying to anyone finding this question - I convinced the powers that be to let it default into a null, then have a calculated column flag indicate it. Fairly similar to your solution

            – Selkie
            Feb 14 at 23:27














          0












          0








          0







          I would use Duplicate Column (from the Add Column ribbon) to make a copy of the column so you can preserve it as entered. Then I would Change the duplicated column's data type to Percentage. That way you can meet all requirements.






          share|improve this answer













          I would use Duplicate Column (from the Add Column ribbon) to make a copy of the column so you can preserve it as entered. Then I would Change the duplicated column's data type to Percentage. That way you can meet all requirements.







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Feb 14 at 8:04









          Mike HoneyMike Honey

          1,8391611




          1,8391611













          • While it technically meets the requirements, it's not very useable for the end-users - one column has %, the other has the % as unreadable numbers and strings.

            – Selkie
            Feb 14 at 17:37











          • I'd be keen to learn about alternatives that would be more useable.

            – Mike Honey
            Feb 14 at 23:04











          • Yeah, my 'solution' will be extremely unsatisfying to anyone finding this question - I convinced the powers that be to let it default into a null, then have a calculated column flag indicate it. Fairly similar to your solution

            – Selkie
            Feb 14 at 23:27



















          • While it technically meets the requirements, it's not very useable for the end-users - one column has %, the other has the % as unreadable numbers and strings.

            – Selkie
            Feb 14 at 17:37











          • I'd be keen to learn about alternatives that would be more useable.

            – Mike Honey
            Feb 14 at 23:04











          • Yeah, my 'solution' will be extremely unsatisfying to anyone finding this question - I convinced the powers that be to let it default into a null, then have a calculated column flag indicate it. Fairly similar to your solution

            – Selkie
            Feb 14 at 23:27

















          While it technically meets the requirements, it's not very useable for the end-users - one column has %, the other has the % as unreadable numbers and strings.

          – Selkie
          Feb 14 at 17:37





          While it technically meets the requirements, it's not very useable for the end-users - one column has %, the other has the % as unreadable numbers and strings.

          – Selkie
          Feb 14 at 17:37













          I'd be keen to learn about alternatives that would be more useable.

          – Mike Honey
          Feb 14 at 23:04





          I'd be keen to learn about alternatives that would be more useable.

          – Mike Honey
          Feb 14 at 23:04













          Yeah, my 'solution' will be extremely unsatisfying to anyone finding this question - I convinced the powers that be to let it default into a null, then have a calculated column flag indicate it. Fairly similar to your solution

          – Selkie
          Feb 14 at 23:27





          Yeah, my 'solution' will be extremely unsatisfying to anyone finding this question - I convinced the powers that be to let it default into a null, then have a calculated column flag indicate it. Fairly similar to your solution

          – Selkie
          Feb 14 at 23:27


















          draft saved

          draft discarded




















































          Thanks for contributing an answer to Super User!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid



          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.


          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1404543%2fpower-query-turning-number-strings-into-numbers-while-preserving-text%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          Сан-Квентин

          Алькесар

          Josef Freinademetz