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

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

Reply
Anonymous
Not applicable

Return a corresponding value from another table based on calculated measure

Hi!

 

I have been struggling with this kind of task for days now. I made a calculated measure that will return an age of a machine in the given time (see a picture below). 

taikuri_0-1653304514384.png

The age of the machine defines a buyback rate that I would like to find from another table to calculate the buyback price for the machine. I have a table that has two columns Age (months) and Buyback rate %, creating a calculated column is not an option since I want this to work dynamically. All the solutions that I have tried so far have failed and I only get blank values as a result. Any help on that one? 

 

2 ACCEPTED SOLUTIONS
Fowmy
Super User
Super User

@Anonymous 
Not enough information but can you try the following meaure:

RateMeasure =
VAR __AgeSelected =
    MAX ( ThisTable[MachineAge] )
RETURN
    CALCULATE (
        MAX ( AgeTablename[Buyback rate %] ),
        AgeTablename[Age] = __AgeSelected
    )

 Replace the table and columns names as per your model
 

Did I answer your question? Mark my post as a solution! and hit thumbs up


Subscribe and learn Power BI from these videos

Website LinkedIn PBI User Group

View solution in original post

Anonymous
Not applicable

Hey! The measure that you posted was unfortunately not working directly (blame is on me, I didn't provide enough information). Luckily I got the measure working, adding the rounddown function on the age and deleting the Max statement from "var age" function was the key as shown below.  

Machine age := 
var age = (MAX(vDimCalendar[Date]) - MAX(Buybacks[Delivered (month/year)])) / 365  * 12
return
ROUNDDOWN(age, 0)
---------------------------------------------------------------------------------------------
Buy-back policy rate := 
VAR __AgeSelected =
     'Measures table'[Machine age] 
RETURN
    CALCULATE (
        MAX ( 'Buyback policy rates'[Trade-in] ),
        'Buyback policy rates'[Month] = __AgeSelected
    )

 

View solution in original post

2 REPLIES 2
Fowmy
Super User
Super User

@Anonymous 
Not enough information but can you try the following meaure:

RateMeasure =
VAR __AgeSelected =
    MAX ( ThisTable[MachineAge] )
RETURN
    CALCULATE (
        MAX ( AgeTablename[Buyback rate %] ),
        AgeTablename[Age] = __AgeSelected
    )

 Replace the table and columns names as per your model
 

Did I answer your question? Mark my post as a solution! and hit thumbs up


Subscribe and learn Power BI from these videos

Website LinkedIn PBI User Group

Anonymous
Not applicable

Hey! The measure that you posted was unfortunately not working directly (blame is on me, I didn't provide enough information). Luckily I got the measure working, adding the rounddown function on the age and deleting the Max statement from "var age" function was the key as shown below.  

Machine age := 
var age = (MAX(vDimCalendar[Date]) - MAX(Buybacks[Delivered (month/year)])) / 365  * 12
return
ROUNDDOWN(age, 0)
---------------------------------------------------------------------------------------------
Buy-back policy rate := 
VAR __AgeSelected =
     'Measures table'[Machine age] 
RETURN
    CALCULATE (
        MAX ( 'Buyback policy rates'[Trade-in] ),
        'Buyback policy rates'[Month] = __AgeSelected
    )

 

Helpful resources

Announcements
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!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

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.