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

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes! Register now.

Reply
Anonymous
Not applicable

Dynamic Lookup Value

Hello all, 

 

I have a table and I am creating columns to find the nth highest average costs based on certain filters. 

 

So I am finding the Highest Cost, the second highest cost and then the third highest cost. 

 

Now... for each of these "highest costs" I am trying to lookup the corresponding value in a specific column

 

Bascially dax finds the 2nd highest cost (in a specific column) and i need it to find the corresponding value on the same row but in another column || ALL this with the same filters. 

I understand the result will be duplicated but that's ok. 

 

Basically, the result in Top Cost #1 Loads should be = 2. 

 

I am filtering on 3 columns  (using earlier to do it dynamically) to obtain this subset of the tables - that I am replicating in my Dax formulas. 

 

Capture.PNG

4 REPLIES 4
v-yuta-msft
Community Support
Community Support

@Anonymous ,

 

Could you please share sample data and give the expected result?

 

Regards,

Jimmy Tao

Anonymous
Not applicable

Here - let me know if that helps

 

Filter 1 Filter 2Filter 3DataDataCompletedCompletedCompletedNeed helpNeed helpNeed helpCompletedCompletedCompletedCompletedNeed HelpNeed HelpNeed HelpCompletedCompleted
RegionCarrierTime periodEquipment TypeAvg CostCount of LoadsTop Cost 1Top Cost 2Top cost 3Top Cost 1 # loadsTop Cost 2 # loadsTop Cost 3 # loadsWACLTop Loads 1Top Loads 2Top Loads 3Top Loads Cost 1Top Loads Cost 2Top Loads Cost 3WACLSavings
1Carrier 119Truck 1              309.43              394.1              364.4              363.912263              368.6656331              291.7              363.9              292.7              320.5          3,703.9
1Carrier 219Truck 1              364.42              394.1              364.4              363.912263              368.6656331              291.7              363.9              292.7              320.5          3,703.9
1Carrier 319Truck 1              363.963              394.1              364.4              363.912263              368.6656331              291.7              363.9              292.7              320.5          3,703.9
1Carrier 419Truck 1              292.731              394.1              364.4              363.912263              368.6656331              291.7              363.9              292.7              320.5          3,703.9
1Carrier 519Truck 1              291.765              394.1              364.4              363.912263              368.6656331              291.7              363.9              292.7              320.5          3,703.9
1Carrier 619Truck 1              160.11              394.1              364.4              363.912263              368.6656331              291.7              363.9              292.7              320.5          3,703.9
1Carrier 719Truck 1              312.26              394.1              364.4              363.912263              368.6656331              291.7              363.9              292.7              320.5          3,703.9
1Carrier 819Truck 1              299.69              394.1              364.4              363.912263              368.6656331              291.7              363.9              292.7              320.5          3,703.9
1Carrier 919Truck 1              394.112              394.1              364.4              363.912263              368.6656331              291.7              363.9              292.7              320.5          3,703.9
1Carrier 1019Truck 1                77.01              394.1              364.4              363.912263              368.6656331              291.7              363.9              292.7              320.5          3,703.9
         Corresponding # of loads of the highest average cost Corresponding # of loads of the 2nd highest average cost Corresponding # of loads of the 3rd highest average cost     Similar logic but need corresponding average cost for the highest number of loads... for 2nd highest number of loads... for 3rd highest number of loads  
danextian
Super User
Super User

Could you please post a sample data (not an image)?





Dane Belarmino | Microsoft MVP | Proud to be a Super User!

Did I answer your question? Mark my post as a solution!


"Tell me and I’ll forget; show me and I may remember; involve me and I’ll understand."
Need Power BI consultation, get in touch with me on LinkedIn or hire me on UpWork.
Learn with me on YouTube @DAXJutsu or follow my page on Facebook @DAXJutsuPBI.
Anonymous
Not applicable

Posted can you help please. ?

Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 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.

Top Solution Authors
Top Kudoed Authors