Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

Triming unwanted data and create another field

Hi,

 

I am new to the forum and started working on Power BI tool, I have excel data set and have 20 fields. I want to create another field by removing some of unwanted data.

 

Field Name: QtrYr

 

QtrYr

Q1-2016

Q2-2015

Q4-2015

...

 

I have used this field in my dashboard as x-axis and when I do sorting I get zig zag, so I wanted to filter the Q1- and Q2- part then I can get another field with Yr only.

 

Is there any possibilities to achieve this?

 

Thanks,

2 ACCEPTED SOLUTIONS
Anonymous
Not applicable

Hi @Anonymous,

 

   if you only want to cut the "Q...-" text in your column. You can:

 

1) go into the query editor

2) click on "Split column" -> "by delimiter"

3) "select or enter delimiter" -->   "--custom--"   -->  -

4) "Split"  -->  "at the right-most delimiter"

5) ok

 

And this is the result:

asp.png

 

 Let me know if it works.

 

#I'M Not An Expert#

View solution in original post

Do all the steps above, but first duplicate the column. Then split the duplicated column as suggested and leave the original alone and you'll have both.





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




View solution in original post

4 REPLIES 4
Anonymous
Not applicable

Hi @Anonymous,

 

   if you only want to cut the "Q...-" text in your column. You can:

 

1) go into the query editor

2) click on "Split column" -> "by delimiter"

3) "select or enter delimiter" -->   "--custom--"   -->  -

4) "Split"  -->  "at the right-most delimiter"

5) ok

 

And this is the result:

asp.png

 

 Let me know if it works.

 

#I'M Not An Expert#

Anonymous
Not applicable

Appreciated your support, but if I want keep existsing column and create another fields like Qtr and Yr seperately.

 

The solution what you have provided is splitting the column.

 

Any possibioities.

Do all the steps above, but first duplicate the column. Then split the duplicated column as suggested and leave the original alone and you'll have both.





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




tjd
Impactful Individual
Impactful Individual

To avoid the zig-zag and get proper order, change (or add a field) to Year-Qtr (2015-Q1, 2015-Q2, etc.).  It will then sort properly on the x-axis.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.