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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
Anonymous
Not applicable

DAX help calculating average based on other columns

In this scenario, I am trying to use the average from column "ABC Bid per KGs" per column "Route" and column "Weight Range".
I want to take the average from ABC Bid per KGS and apply it to the rows where ABC Company Bid = "N"
For the rows where ABC Company Bid = Y and are the same Route and Same Weight Range I want the average.
Then take this average where ABC Company Bid = "Y" and apply to the rows where ABC Company Bid = "N" for the same Route and same Weight Range
Goal of comparing the winning rate to  average rate to see how the rates would have compared if bid upon.
IE - apply average rate of $8.62 to any row where Route is the same and Weight Range is the same.  Order # 7, 11, 16, etc 
IE - apply average rate of $4.31 to any row where Route is the same and Weight Range is the same.  Order # 3, 8, 10

 

 

ABC Company BidOrder #Company NameRouteOrder CountKGsWeight RangeWinning Rate per KGsABC Bid per KGsAverage Rate per Route and Weight Range
N7Company 6Germany to Mexico1120100 plus$13.08  
N11Company 8Germany to Mexico1200100 plus$24.50  
N16Company 11Germany to Mexico1320100 plus$24.66  
N17Company 13Germany to Mexico1345100 plus$11.95  
N12Company 8Germany to Mexico1400100 plus$7.75  
N9Company 7Germany to Mexico1419100 plus$7.10  
N13Company 8Germany to Mexico1467100 plus$8.35  
N3Company 5Germany to Mexico1542500 plus$5.84  
N8Company 7Germany to Mexico1599500 plus$5.38  
N10Company 7Germany to Mexico1934500 plus$3.91  
N15Company 11Germany to Mexico122881000 plus$6.11  
N4Company 6Germany to Mexico142241000 plus$3.98  
N6Company 6Germany to Mexico145761000 plus$4.06  
N5Company 6Germany to Mexico161601000 plus$3.67  
Y44Company 9Germany to Mexico14850 plus$55.33$26.21 
Y46Company 12Germany to Mexico17050 plus$48.30$34.49 
Y42Company 8Germany to Mexico1177100 plus$10.79$10.16Average = $8.62
Y37Company 5Germany to Mexico1268100 plus$8.38$11.02Average = $8.62
Y27ABC CompanyGermany to Mexico1406100 plus$4.68$4.68Average = $8.62
Y31ABC CompanyGermany to Mexico1753500 plus$3.00$3.00Average = $4.31
Y21ABC CompanyGermany to Mexico1800500 plus$5.62$5.62Average = $4.31
Y40Company 7Germany to Mexico1990500 plus$4.70$4.30Average = $4.31
Y34ABC CompanyGermany to Mexico114021000 plus$4.34$4.34 
Y33ABC CompanyGermany to Mexico114261000 plus$2.96$2.96 
Y28ABC CompanyGermany to Mexico115001000 plus$4.64$4.64 
Y23ABC CompanyGermany to Mexico115661000 plus$4.44$4.44 
Y25ABC CompanyGermany to Mexico115661000 plus$3.27$3.27 
Y36Company 4Germany to Mexico116991000 plus$4.94$4.77 
Y24ABC CompanyGermany to Mexico119011000 plus$2.50$2.50 
Y32ABC CompanyGermany to Mexico120631000 plus$3.00$3.00 
Y18Company 1Germany to Mexico120631000 plus$3.71$3.12 
Y20ABC CompanyGermany to Mexico128511000 plus$2.53$2.53 
Y43Company 8Germany to Mexico133471000 plus$3.91$3.12 
Y26ABC CompanyGermany to Mexico139151000 plus$2.31$2.31 
Y19Company 2Germany to Mexico140161000 plus$3.80$4.04 
Y38Company 6Germany to Mexico140161000 plus$3.83$2.98 
Y39Company 7Germany to Mexico141611000 plus$5.28$4.38 
Y35ABC CompanyGermany to Mexico146011000 plus$2.87$2.87 
Y22ABC CompanyGermany to Mexico153541000 plus$3.65$3.65 
Y41Company 7Germany to Mexico154401000 plus$4.95$3.04 
Y29ABC CompanyGermany to Mexico172261000 plus$2.33$2.33 
Y30ABC CompanyGermany to Mexico1123901000 plus$2.50$2.50 
0 REPLIES 0

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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