Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now
Good Day,
So I have a dataset that is looking at inventory metrics at multiple plants. For example, I have determined where I have a plant that is the Primary consumer of a particular material at one plant and therefore in an effort to maximize material consumption, other plants could transfer their like material to them if they are not meeting certain criteria. In the example below, I would like help solving for the "Transfer To" Column by particular material filtered. So that the other plants would know whom to send their materials to get consumed and reduce overall inventory. All of the fields shown are available and I would like a DAX solution to help on this.
Thanks in advance for your help!
| Plant | Material | Rank Consumption | Rank Inv Turns | Transfer | Primary | Transfer To |
| A | 123 | 1 | 1 | NA | Primary | NA |
| B | 123 | 4 | 3 | Transfer | Secondary | A |
| C | 123 | 2 | 4 | Transfer | Secondary | A |
| D | 123 | 3 | 2 | Transfer | Secondary | A |
| A | 456 | 2 | 3 | Transfer | Secondary | B |
| B | 456 | 1 | 1 | NA | Primary | NA |
| C | 456 | 4 | 2 | Transfer | Secondary | B |
| D | 456 | 3 | 4 | Transfer | Secondary | B |
Solved! Go to Solution.
Hi @heiligbd ,
Not sure if you want a calculated column or a measure but here is the values for both:
Calculated column:
TransferTo =
IF (
'Table'[Transfer] <> "NA",
MAXX (
TOPN (
1,
FILTER ( 'Table', 'Table'[Material] = EARLIER ( 'Table'[Material] ) ),
'Table'[Rank Inv Turns], ASC
),
'Table'[Plant]
),
'Table'[Transfer]
)
Measure:
TransferTo _ =
IF(SELECTEDVALUE('Table'[Transfer]) <> "NA",MAXX (
TOPN (
1,
FILTER ( ALLSELECTED('Table'[Material], 'Table'[Rank Inv Turns],'Table'[Plant]), 'Table'[Material] = MAX ( 'Table'[Material] ) ),
'Table'[Rank Inv Turns], ASC
),
'Table'[Plant]
), SELECTEDVALUE('Table'[Transfer]))
Regards
Miguel Félix
Proud to be a Super User!
Check out my blog: Power BI em PortuguêsAwesome! Thanks for the help!
Hi @heiligbd ,
Not sure if you want a calculated column or a measure but here is the values for both:
Calculated column:
TransferTo =
IF (
'Table'[Transfer] <> "NA",
MAXX (
TOPN (
1,
FILTER ( 'Table', 'Table'[Material] = EARLIER ( 'Table'[Material] ) ),
'Table'[Rank Inv Turns], ASC
),
'Table'[Plant]
),
'Table'[Transfer]
)
Measure:
TransferTo _ =
IF(SELECTEDVALUE('Table'[Transfer]) <> "NA",MAXX (
TOPN (
1,
FILTER ( ALLSELECTED('Table'[Material], 'Table'[Rank Inv Turns],'Table'[Plant]), 'Table'[Material] = MAX ( 'Table'[Material] ) ),
'Table'[Rank Inv Turns], ASC
),
'Table'[Plant]
), SELECTEDVALUE('Table'[Transfer]))
Regards
Miguel Félix
Proud to be a Super User!
Check out my blog: Power BI em PortuguêsShare feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
Check out the February 2026 Power BI update to learn about new features.
| User | Count |
|---|---|
| 50 | |
| 49 | |
| 35 | |
| 15 | |
| 14 |
| User | Count |
|---|---|
| 91 | |
| 75 | |
| 41 | |
| 26 | |
| 25 |