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
jferrando
Frequent Visitor

Extract part of a field with different content

Hi! I'm quite new in Power BI and yet discovering its amazing possibilities.

 

Right now I'm creating a monitoring dashboard for a backup service. I connected to an Exchange account and read it's backup confirmation emails. This emails are sent from different platforms and have different structures.

 

What I'm trying to do is to get the JOB_NAME from every email subject. The structures I have are the following:

 

JOB_NAME - Copia de seguridad issues

JOB_NAME: issues

Copia JOB_NAME - Issues

Copia JOB_NAME: issues

Informe de copia [issues] > client > JOB_NAME > date, issues

Copia programada, client > JOB_NAME > date, issues

Alerta de BE: Issues (Servidor: Server_name) (Tarea:JOB_NAME)

Job JOB_NAME "completed:" Issues

[Job_result] JOB_NAME (VM_count) Issues

 

Each line is one kind of subject. I have tried to extract text between delimiters, but this means I have to creats a column for each kind of subject line. 

 

Have you any idea of how can I do this? Can I have a column that reads the subject_field and gets JOB_NAME?

 

Thanks!

6 REPLIES 6
v-shex-msft
Community Support
Community Support

HI @jferrando,

 

It is hard to clarity your requirement without any sample data, can you please share more detailed informations?

 

For your requirement, you should ensure where the fields stored, then use records function to extract specific fields values.

Record functions

 

Regards,

xiaoxin Sheng

 

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

Hi! Thanks for your reply

 

What I try to do is to identify the Job_Name on every email sent by each platform. For instance, I receive email sent from Veeam Backup software with this structure on the subject:

 

[Failed] serverDC - serverMAIL (2 VMs) 2 failed

or

Job serverDC- serverMAIL completed: Failed

 

What I need to do is to get the Job_Name (server DC - serverMAIL) in a column wich is between [Failed] and (2VMs) in the first case, and between Job and completed: in the second case.

 

In this examples I need to isolate Job_Name with this structure, but I also use other backup platforms wich send email using another subject structure. Actually, if we find the way to isolate Job_Name in this examples, I guess we'll be able to do it with the rest of the subjects.

 

Thank you

HI @jferrando,

 

Can you please share some sample data and actual transfer result for analysis? It is hard to clarify your issue from your description.

Notice: please do mask sensitive data before sharing. 

 

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

Hi, thanks for your reply and attention.  This is the kind of subjects i receive, and from all of them I need to get the text underlined:

 

  • [Failed] BackupUSB - Setmanal (3 VMs) 3 failed
  • [Warning] serverDC - serverMAIL (3 VMs) 1 warning
  • [Failed] BackupUSB - Setmanal (3 VMs) 3 failed
  • Job ServerSAP - serverSQL completed: Failed
  • Job serverDC - serverFS completed: Failed
  • VM backup job ServerSQL completed: Failed
  • VM backup job ServerFS completed: Success
  • Alerta de Backup Exec: Fallo de tarea (Servidor: "SRVOR") (Tarea: "Backup Company")
  • Alerta de Backup Exec: Fallo de tarea (Servidor: "SRVDC") (Tarea: "Copia de Seguretat")
  • Còpia programada, ABC Company> SAP - CLOUD > 2017-11-20-14-30-00, s'ha perdut
  • Còpia programada, ABC Company> PACO-PC > 2017-11-17-14-00-00, s'ha perdut
  • Copia NAS - ABC Company: Backup completado con exito
  • COPIA ABC Company: Backup completado con exito
  • Copia ServerDC (Dades) a NAS Synology - Copia de seguridad finalizada con errores
  • Datos - ABC Company - Copia Datos - Disco NAS - Copia de seguridad finalizada con errores
  • Copia de Seguretat - Copia de Segureta DIARIA - NAS i USB - Copia de seguridad completada correctamente

What I have identified is the structure of all kind of subjects, and pasted on the messages before. I've been testing with FIND() to find the beggining and ending of each Job_Name so I could try to find it, but I'm an amateur Power BI user and I'm a bit lost 🙂

 

Thank you!

Forget PowerBI for a second, how you do will otherwise? I don't see any standard pattern and that will make it hand. Although there is find function for DAX which can help you.

 

 



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

Based on the example befor, I would ask Power BI something like:

 

For: [Failed] BackupUSB - Setmanal (3 VMs) 3 failed

I'd ask: Get all text between "] " and " ("

 

For: Job ServerSAP - serverSQL completed: Failed

I'd ask: Get all text between "Job " and "completed:"

 

For: VM backup job ServerSQL completed: Failed

I'd ask: Get text between "backup job" and "completed:"

 

For: Alerta de Backup Exec: Fallo de tarea (Servidor: "SRVOR") (Tarea: "Backup Company")

I'd ask: Get all text between "Tarea: "" and "")"

 

And so on. There is about 9 different subject structures

 

Thanks!

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.