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

how to identify linked activity

Hi All,

 

I've two tables namely opportunities and events. I would like to know if there is any linked acitivity in future for an opportunity from the opportunity table. Both tables are linked on ID field.

 

Regards,

Viresh

4 REPLIES 4
v-xuding-msft
Community Support
Community Support

Hi @Anonymous ,

Please share some sample data and expected results that will make us understand about your requirement clearly.

Please see this post regarding How to Get Your Question Answered Quickly: 

https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490

 

Best Regards,

Xue Ding

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly. Kudos are nice too.

Best Regards,
Xue Ding
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
Not applicable

Hi, Please find the attached screenshot.

 

first table contains an ID with future close date and which is available in second table with future activitydate.

 

Get list of all open opportunities (Isclosed = false)

For each opportunity check if there is at least one linked activity with a date in the future.

If true, YES else NO

 

Assume 4 of 80 open opportunities do not have one or more activity in the future

Calculated % is 76/4+76) = 95%

 

Regards,

Viresh

Linked activity.PNG

Hi @Anonymous ,

I created a sample and added some data in it based on your sample data. You could try and check if it is what you want.

Measure = 
var max_record = CALCULATE(MAX(Events[ActivityDate]),ALLEXCEPT(Events,Events[WhatID]))
var opportunaty_date = CALCULATE(MAX(Opportunaties[ClosedDate]),FILTER(ALLEXCEPT(Opportunaties,Opportunaties[ID]),Opportunaties[IsClosed] = "Flase"))
return
IF(max_record <= opportunaty_date , "Yes","No")

Measure 2 = 
var yes = CALCULATE(DISTINCTCOUNT(Opportunaties[ID]),FILTER(Opportunaties,[Measure] = "Yes"))
var all_id = DISTINCTCOUNT(Opportunaties[ID])
return
DIVIDE(yes,all_id)

2.PNG

Best Regards,

Xue Ding

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Best Regards,
Xue Ding
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
PattemManohar
Community Champion
Community Champion

@Anonymous Please try using RELATED or LOOKUPVALUE functions..

Any sample data and expected output will be helpful to provide you an accurate solution.




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

Proud to be a PBI Community Champion




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.