Forum Discussion
Changing the format of values
Hello everyone! I am looking to append 2 queries in Power BI. I am appending an ID for each of the tables (no issues with that at all), and then a name. I have a question though.
One of the queries I am appending has the name formatted like so:
JohnDoe.
Where as the 2nd query has the name formatted like this:
Doe, John
Is there a way that I can somehow change the way one of these names are formatted? So that I can not have duplicate names on my name slicer of the dashboard?
No. You will need to pre-split the first list so it is John Doe and the second so it is Doe John - all in separate columns, then merge the columns back in the correct order.
For the first transformation select the column, go to Transform, then select Split Column, and select from Lower to Upper Case.
It becomes this
If you want it to be Lastname, FirstName, then just merge those:
Select Column1.2 first, then Column1.1, then on the Transform ribbon, Merge Columns, then use this setting:It becomes this:
The problem will be with names that have multiple case transitions. JohnDoe is simple. JeffMcAllister is not. It will get split into 3 columns.
2 Replies
- edhans
Community Champion
No. You will need to pre-split the first list so it is John Doe and the second so it is Doe John - all in separate columns, then merge the columns back in the correct order.
For the first transformation select the column, go to Transform, then select Split Column, and select from Lower to Upper Case.
It becomes this
If you want it to be Lastname, FirstName, then just merge those:
Select Column1.2 first, then Column1.1, then on the Transform ribbon, Merge Columns, then use this setting:It becomes this:
The problem will be with names that have multiple case transitions. JohnDoe is simple. JeffMcAllister is not. It will get split into 3 columns.
- AnonymousNot applicable
Hi
Could you tell me if your problem has been solved?
If it is, kindly Accept it as the solution. More people will benefit from it.
Or you are still confused about it, please provide me with more details about your problem.
Best Regards,
Stephen Tao