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
bsas
Post Patron
Post Patron

Calculate ralted date in 1 to many relatonship based on filtered period

Hi All,

I have problem with calculating related close date in opp table based on selected period from snap table.


There are 2 tables opp:

idclosedaterelated date
11117/30/2020 
22227/15/2020 


and snap

idclosedatesnap period (end of week)
11117/30/2020  7/31/2020
11117/17/2020  7/19/2020
11117/2/2020  7/5/2020
22227/15/2020  7/19/2020
22227/4/2020  7/5/2020

 

relationship is 1 opp to many snap with single cross filter direction.
I need to have related date calculated using calculated column based on selected snap period from snap Table.
e.g. if snap period = 7/5/2020:

idclosedaterelated date
11117/30/2020  7/2/2020
22227/15/2020  7/4/2020

if snap period is 7/19/2020:

idclosedaterelated date
11117/30/2020  7/17/2020
22227/15/2020  7/15/2020



 

1 ACCEPTED SOLUTION
Icey
Community Support
Community Support

Hi @bsas ,

 

The value of each row of calculated column  will not change with the change of the slicer. It is not dynamic. 

It is suggested to create a measure like so:

Related Date Measure =
LOOKUPVALUE (
    snap[closedate],
    snap[id], SELECTEDVALUE ( opp[id] ),
    snap[snap period], SELECTEDVALUE ( snap[snap period] )
)

snap.gif

 

 

 

Best Regards,

Icey

 

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

View solution in original post

1 REPLY 1
Icey
Community Support
Community Support

Hi @bsas ,

 

The value of each row of calculated column  will not change with the change of the slicer. It is not dynamic. 

It is suggested to create a measure like so:

Related Date Measure =
LOOKUPVALUE (
    snap[closedate],
    snap[id], SELECTEDVALUE ( opp[id] ),
    snap[snap period], SELECTEDVALUE ( snap[snap period] )
)

snap.gif

 

 

 

Best Regards,

Icey

 

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

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.