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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

Reply

How to remove certain text from the subject line

I have a two subjects like "${Recipient.lead.companyname[0]!""} | Efficiency meets affordability with Microsoft 365 for nonprofits" and  "Efficiency meets affordability ${Recipient.lead.companyname[0]!""} | with Microsoft 365 for nonprofits". I have to remove this text "${Recipient.lead.companyname[0]!""} |" and show remaing text.

 

Kindly help me to achecive this.

 

Thanks & Regards,

Vamsi Krishna

1 ACCEPTED SOLUTION

Hi Tahreem,

 

Thanks for your reply. I have used replace option in transform data then my problem is solved.

VamsiKrishna98_0-1684411857962.png

 

View solution in original post

8 REPLIES 8
Idrissshatila
Super User
Super User

Hello @VamsiKrishna98 ,

 

one of the things that you can do is to right click on the value in power query and replace it with the value you want.

 

https://learn.microsoft.com/en-us/power-query/replace-values

 

If I answered your question, please mark my post as solution, Appreciate your Kudos 👍

Follow me on Linkedin



Did I answer your question? Mark my post as a solution! Appreciate your Kudos
Follow me on LinkedIn linkedIn
Vote for my Community Mobile App Idea

Proud to be a Super User!




Thanks for your response. Can we acheive this with any dax formula.

@VamsiKrishna98 Try this DAX column:

Output = MID('Subject Table'[Subject],SEARCH("|",'Subject Table'[Subject],1,0)+1,LEN('Subject Table'[Subject]))
 
Tahreem24_0-1683107466663.png

 

Don't forget to give thumbs up and accept this as a solution if it helped you!!!

Please take a quick glance at newly created dashboards : Restaurant Management Dashboard , HR Analytics Report , Hotel Management Report, Sales Analysis Report , Fortune 500 Companies Analysis , Revenue Tracking Dashboard

In the screenshot for second subject in output this text "Efficiency meets affordability" is missing.

@VamsiKrishna98 Try creating a column like below:

Output =
VAR Res1 = SUBSTITUTE(SUBSTITUTE('Subject Table'[Subject],"""${Recipient.lead.companyname[0]!"""""," "),"} |"," ")
RETURN SUBSTITUTE(res1,""""," ")
Tahreem24_0-1683188177291.png

 

 
Don't forget to give thumbs up and accept this as a solution if it helped you!!!

Please take a quick glance at newly created dashboards : Restaurant Management Dashboard , HR Analytics Report , Hotel Management Report, Sales Analysis Report , Fortune 500 Companies Analysis , Revenue Tracking Dashboard

Hi Tahreem,

 

Thanks for your reply. I have used replace option in transform data then my problem is solved.

VamsiKrishna98_0-1684411857962.png

 

Hello @VamsiKrishna98 ,

 

yes, but you should create a new column that says the following:

 

new column =
IF (
columnName = "${Recipient.lead.companyname[0]!""} | Efficiency meets affordability with Microsoft 365 for nonprofits",
"Efficiency meets affordability with Microsoft 365 for nonprofits",
IF (
columnName = "Efficiency meets affordability ${Recipient.lead.companyname[0]!""} | with Microsoft 365 for nonprofits",
" with Microsoft 365 for nonprofits",
columnName
)
)

If I answered your question, please mark my post as solution, Appreciate your Kudos 👍

Follow me on Linkedin



Did I answer your question? Mark my post as a solution! Appreciate your Kudos
Follow me on LinkedIn linkedIn
Vote for my Community Mobile App Idea

Proud to be a Super User!




We have many many different subjects like that. It's difficult to add each time when we get new subject to formula. Is there a way by automatically removing this piece of text "${Recipient.lead.companyname[0]!""} |".

Helpful resources

Announcements
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.