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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

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)?










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


Proud to be a Super User!









"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
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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