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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
mdex
Resolver I
Resolver I

Lookupvalue no longer working - A table of multiple values was supplied error

After my latest data refresh one of my formula is no longer working. DTO Rates hasn't changed but we have more lines in TRSBookings

 

It's probably overcomplicated but I want to compare the custom columns from 2 TRSBookings and DTO Rates then return the DTO Rates[Rate], if the custom doesn't provide a match then compare only the TRS/Request_No, if no match on either the value should be blank/0/null.

 

DTORate = if(IFERROR(LOOKUPVALUE('DTO Rates'[Rate],'DTO Rates'[Custom],TRSBookings[Custom]),LOOKUPVALUE('DTO Rates'[Rate],'DTO Rates'[TRS],TRSBookings[REQUEST_NO])) =0,LOOKUPVALUE('DTO Rates'[Rate],'DTO Rates'[TRS],TRSBookings[REQUEST_NO]),LOOKUPVALUE('DTO Rates'[Rate],'DTO Rates'[Custom],TRSBookings[Custom]))
 
Example data
 
TRSBookings
Request_NoTeam_IDCustomDTORate
R0422581100R042258 1100715.62
R0415061192R041506 1192533.89
R0415061198R041506 1198408.5
R0411011198R041101 1198 
R0415061192R041506 1192533.89

 

DTO Rates

TRSTeam_IDCustomRate
R042258  715.62
R0415061192R041506 1192533.89
R0415061198R041506 1198408.5

 

Could someone please help or point me in the right direction?

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@mdex , create a new column in TRSBookings

 

maxx(filter('DTO Rates', 'DTO Rates'[TRS]= TRSBookings[REQUEST_NO && 'DTO Rates'[Custom] =TRSBookings[Custom] && 'DTO Rates'[Team_ID] =TRSBookings[Team_ID]),'DTO Rates'[Rate])

 

if need you can remove Team_ID if not needed

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

View solution in original post

2 REPLIES 2
amitchandak
Super User
Super User

@mdex , create a new column in TRSBookings

 

maxx(filter('DTO Rates', 'DTO Rates'[TRS]= TRSBookings[REQUEST_NO && 'DTO Rates'[Custom] =TRSBookings[Custom] && 'DTO Rates'[Team_ID] =TRSBookings[Team_ID]),'DTO Rates'[Rate])

 

if need you can remove Team_ID if not needed

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Hi Amit,

 

Thanks for taking a look. I realise there was a slight discrepany with my example data. DTO Rate column is being calculated in TRSBookings I incorrectly had this in the table as rate.

The rate for R042258 was also missing from both tables. The view you see if my expected result.

 

Your formula works ok where custom columns match, but if no custom match then just the TRS/Request_NO should be compared.

 

Hope this makes sense.

 

EDIT: Think I have it!

 

DTORate = IF(maxx(filter('DTO Rates', 'DTO Rates'[Custom] =TRSBookings[Custom]),'DTO Rates'[Rate]) = 0,maxx(filter('DTO Rates', 'DTO Rates'[TRS]= TRSBookings[REQUEST_NO] ),'DTO Rates'[Rate]),maxx(filter('DTO Rates', 'DTO Rates'[Custom] =TRSBookings[Custom]),'DTO Rates'[Rate]))

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.