Power Pivot: Working on corresponding values of maximum values

gifariz

Board Regular
Joined
May 2, 2021
Messages
112
Office Version
  1. 365
Platform
  1. Windows
Hi all, new here. I am working on a data more than 1 million rows, so I need to work it on Power Pivot. Let's say this data has column A and B. When I make the pivot table of this data, I can get the maximum value of column A. Let's say column A has 4 cells containing this value. I want to get the minimum value among the 4 cells in column B corresponding those max of A.

I can do this in normal sheet. First, by counting the number of cells equal to max value of A: countMaxA=COUNTIF(A:A,maxA). Then, sort the range "A:B" by column A. Then, get the minimum of corresponding B by minCorrB=MIN(OFFSET(B1,MATCH(maxA,A:A,0)-1,0,countMaxA,1)).

But I dont know how to do this in Power Pivot. Any suggestion?
 

Excel Facts

Select a hidden cell
Somehide hide payroll data in column G? Press F5. Type G1. Enter. Look in formula bar while you arrow down through G.
CALCULATE(MIN(Table1[val b]);FILTER(Table1;Table1[val a]=MAX(Table1[val a])))
 
Upvote 0
Solution
It works! Thank you very much. I just knew about DAX.
 
Upvote 0

Forum statistics

Threads
1,215,127
Messages
6,123,203
Members
449,090
Latest member
bes000

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top