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;
}
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
add a comment |
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
add a comment |
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
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
microsoft-excel power-query
asked Feb 11 at 18:34
SelkieSelkie
234116
234116
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
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.
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
add a comment |
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
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
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.
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
add a comment |
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.
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
add a comment |
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.
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.
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
add a comment |
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
add a comment |
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.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
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