Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more
Hello,
I have an issue with the related function, what am I doing wrong?
I get the error message:
The column 'Orders[BatchDuration]' either doesn't exist or doesn't have a relationship to any table available in the current context.
My formula looks like this:
Productive_Time(sec)=
If(
DetailedCounts[CycleTimeSeconds] > (related(Orders[BatchDuration])),
related(Orders[BatchDuration]),
DetailedCounts[CycleTimeSeconds])
I have a many to one relationship between my two tables
Do you have any idea?
Thank you in advance
Solved! Go to Solution.
Hi @Lagoon ,
Based on my test, everything works on my side(Many-one ,active relationship, Import mode), but I could reproduce the error when I delete the relationship or make the relationship inactive.
In addition, according to the official document, RELATED function cannot be used to fetch a column across a limited relationship. Please check.
And from my understanding, you want to get the smaller value for each OrderID between two tables,right?
If so, you could try the following formula to create a column:
Column =
var fromOrdersTable=LOOKUPVALUE('Orders'[BatchDuration],Orders[OrderID],[OrderID])
return IF([Productive_Time(sec)]>fromOrdersTable,fromOrdersTable,[Productive_Time(sec)])
The final output is shown below:
Best Regards,
Eyelyn Qin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Lagoon ,
Based on my test, everything works on my side(Many-one ,active relationship, Import mode), but I could reproduce the error when I delete the relationship or make the relationship inactive.
In addition, according to the official document, RELATED function cannot be used to fetch a column across a limited relationship. Please check.
And from my understanding, you want to get the smaller value for each OrderID between two tables,right?
If so, you could try the following formula to create a column:
Column =
var fromOrdersTable=LOOKUPVALUE('Orders'[BatchDuration],Orders[OrderID],[OrderID])
return IF([Productive_Time(sec)]>fromOrdersTable,fromOrdersTable,[Productive_Time(sec)])
The final output is shown below:
Best Regards,
Eyelyn Qin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.