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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
aghanchi
Frequent Visitor

lookup column value from related table

How can I get the Dates[FY] column value based on the inactive relationship between the Cases[CloseDate] and Dates[Date] columns?

I want to add a column to Cases table that will hold this value.

aghanchi_0-1612498392855.png

 

1 ACCEPTED SOLUTION
aghanchi
Frequent Visitor

Found the Solution:

CloseDateFY = LOOKUPVALUE(Dates[FY], Dates[Date], COALESCE('Cases'[CloseDate], TODAY()))

View solution in original post

6 REPLIES 6
joglidden2
Post Patron
Post Patron

Amit-Chandak, you always deliver! @amitchandak 

aghanchi
Frequent Visitor

Found the Solution:

CloseDateFY = LOOKUPVALUE(Dates[FY], Dates[Date], COALESCE('Cases'[CloseDate], TODAY()))
amitchandak
Super User
Super User

@aghanchi , not needed having an active relationship. Example of measures 

 

calculate(countrows(table), USERELATIONSHIP('Date'[date], Table[CloseDate]))

 

calculate(countrows(table), USERELATIONSHIP ('Date'[date], Table[OpenDate]))

@amitchandak I'm sorry, I forgot to mention that I am not needing an aggregation. Rather I need to add a column to the Cases table that is fetched from the Dates table based on that inactive relationship i.e. Cases[CloseDate] = Dates[Date].

amitchandak
Super User
Super User

I'm sorry @amitchandak . The article did not apply to my situation. I have now rephrased my question. Please see it again. I need a column value from the Dates table based on an inactive relationship. I know I will be using USERELATIONSHIP somewhere in there, but don't know how.

Thanks.

Helpful resources

Announcements
PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

Top Solution Authors