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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

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
November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors