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
Vtomsons
Helper I
Helper I

Voicemails returned

 

Hi,

 

I have a sample of the data I am working with. Result I am trying to produce is how many voicemails have been returned from a sales activity log with these columns (data set is thousands long so I have isolated one "contact" that had a returned voicemail. Trick is I would like the result to appear on the row that the voicemail occured (as I have multiple Campiagns "Case Subjects" that voicemails could be logged.

I would like to create a new column "voicemail returned" that would return TRUE for only the message type "Outgoing" and Phone results with "voicemail". Ideally it would look for a message type of "Incoming" that occured after the "sent Date" of the original outgoing voicemail. 

This is probably simple for some of you out there but way beyond my skillset...thanks in advance for any guidance.

 

ContactMessage TypeChannelPhone ResultsCase Message SubjectCase SubjectSent Date
Kate GowenIncomingEmail DOHS discount paymentGowen DOHS16/08/2022 08:14 AM
Kate GowenOutgoingEmail DOHS discount payment replyGowen DOHS16/08/2022 08:14 AM
Kate GowenOutgoingEmail acceptance letterGowen DOHS15/08/2022 04:03 PM
Kate GowenOutgoingEmail Registration reply2022 OHS/CPSL 30% Discount Non-Consent Follow-UP15/08/2022 03:23 PM
Kate GowenIncomingEmail Ready to register2022 OHS/CPSL 30% Discount Non-Consent Follow-UP15/08/2022 03:18 PM
Kate GowenOutgoingPhoneVoice MailLeft Voicemail. No Consent to Email2022 OHS/CPSL 30% Discount Non-Consent Follow-UP02/08/2022 02:57 PM
Kate GowenOutgoingPhoneVoice MailLeft Voicemail. No Consent to Email2022 May DOHS Information Session Follow-up20/07/2022 03:35 PM
1 ACCEPTED SOLUTION

calculated column: 

VM Ret = 
if([Phone Results]="Voice Mail",
    var c = [Contact]
    var cs = [Case Subject]
    var sd = [Sent Date]
    var r = calculate(COUNTROWS('Table'),ALL('Table'),'Table'[Contact]=c,'Table'[Case Subject]=cs,'Table'[Message Type]="Incoming",'Table'[Sent Date]>sd)
    return if(r>0,"True","False"))

see attached.

View solution in original post

3 REPLIES 3
lbendlin
Super User
Super User

please indicate the expected result based on the sample data.  Which of the rows should be tagged?

Hi,

 

Line 6 (because it has phone result of "voicemail") would have an additional column indicating (true/false) that at a later sent date an incoming message type from the same student (contact) with the same case subject (campaign name) was logged. Line 7 would be an example of false as although there are later incoming message types, none from the specific case subject (2022 May DOHS Information Session Follow-up).

 

My data set would have many different contacts and case subjects to analyze. Really appreciate your insight and if you have any suggestions/ideas.

 

Added the result below for voicemail returned column and the row that would yield a positive/negative result.

 

Thanks

 

 

ContactMessage TypeChannelPhone ResultsCase Message SubjectCase SubjectSent DateVoicemail Returned?
Kate GowenIncomingEmail DOHS discount paymentGowen DOHS16/08/2022 08:14 AM 
Kate GowenOutgoingEmail DOHS discount payment replyGowen DOHS16/08/2022 08:14 AM 
Kate GowenOutgoingEmail acceptance letterGowen DOHS15/08/2022 04:03 PM 
Kate GowenOutgoingEmail Registration reply2022 OHS/CPSL 30% Discount Non-Consent Follow-UP15/08/2022 03:23 PM 
Kate GowenIncomingEmail Ready to register2022 OHS/CPSL 30% Discount Non-Consent Follow-UP15/08/2022 03:18 PM 
Kate GowenOutgoingPhoneVoice MailLeft Voicemail. No Consent to Email2022 OHS/CPSL 30% Discount Non-Consent Follow-UP02/08/2022 02:57 PMTrue
Kate GowenOutgoingPhoneVoice MailLeft Voicemail. No Consent to Email2022 May DOHS Information Session Follow-up20/07/2022 03:35 PMFalse

calculated column: 

VM Ret = 
if([Phone Results]="Voice Mail",
    var c = [Contact]
    var cs = [Case Subject]
    var sd = [Sent Date]
    var r = calculate(COUNTROWS('Table'),ALL('Table'),'Table'[Contact]=c,'Table'[Case Subject]=cs,'Table'[Message Type]="Incoming",'Table'[Sent Date]>sd)
    return if(r>0,"True","False"))

see attached.

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.