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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
jaduncan0515
Frequent Visitor

How do I optimize a supplier portfolio within the US?

I have a table with the below fields:

Supplier NameState% OutsourcedPrice

 

I need to find out what the fewest number of suppliers to cover all US states with the lowest price and lowest % outsourced in each state. What is the best way going about this?

 

I'd like to be able to show this in a table and a map visualization.

 

Thanks in advance!

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @jaduncan0515 ,

 

(1) We can create measures.

Min_price = CALCULATE(MIN('Table'[Price]),FILTER(ALLSELECTED('Table'),'Table'[State]=MAX('Table'[State])))
Min_outourced = CALCULATE(MIN('Table'[Outsourced %]),FILTER(ALLSELECTED('Table'),'Table'[State]=MAX('Table'[State])))
Vendor_Name = CALCULATE(MAX('Table'[Vendor Name]),FILTER(ALLSELECTED('Table'),[State]=MAX('Table'[State]) && [Price]=[Min_price] && [Outsourced %]=[Min_outourced]))

(2) We can create a table.

Table 2 = SUMMARIZE(ALLSELECTED('Table'),[State],"min price",[Min_price],"min outourced",[Min_outourced],"vendor name",[Vendor_Name])

(3) Then the result is as follows.

vtangjiemsft_0-1716434642781.png

 

 

Best Regards,

Neeko Tang

If this post  helps, then please consider Accept it as the solution  to help the other members find it more quickly. 

View solution in original post

3 REPLIES 3
Anonymous
Not applicable

Hi @jaduncan0515 ,

 

According to your description, here are my steps you can follow as a solution.

(1) This is my test data.

vtangjiemsft_0-1716346835135.png

(2) We can create a state table that includes all states.

Sample data:

vtangjiemsft_1-1716346892257.png

(3)We can create a calculated column.

Flag = var _a=COUNTROWS(ALL('State'))
var _b=COUNTROWS(FILTER(ALL('Table'),'Table'[Supplier Name]=EARLIER('Table'[Supplier Name])))
RETURN IF(_a=_b,1,0)

(4) We can create measures.

Sum_outourced = CALCULATE(SUM('Table'[% Outsourced]),ALLEXCEPT('Table','Table'[Supplier Name]))
Sum_price = CALCULATE(SUM('Table'[Price]),ALLEXCEPT('Table','Table'[Supplier Name]))
Count = var a=MINX(FILTER(ALLSELECTED('Table'),[Flag]=1),[Sum_price])
var b=MINX(FILTER(ALLSELECTED('Table'),[Flag]=1),[Sum_outourced])
return CALCULATE(DISTINCTCOUNT('Table'[Supplier Name]),FILTER('Table',[Flag]=1&&[Sum_outourced]=b&&[Sum_price]=a))

(5) Then the result is as follows.

vtangjiemsft_2-1716347061628.png

 

If the above one can't help you get the desired result, please provide some sample data in your tables (exclude sensitive data) with Text format and your expected result with backend logic and special examples. It is better if you can share a simplified pbix file. Thank you.

 

Best Regards,

Neeko Tang

If this post  helps, then please consider Accept it as the solution  to help the other members find it more quickly. 

Thank you. That is close. What I failed to mention is that I don't need the vendor to cover the whole US, I need an optimized list containing the fewest number vendors that will cover the US combined at with the lowest price and outsourced %.

 

The forum will not allow me to upload files, so I've put a link to a google sheet below of some sample data.

 

https://docs.google.com/spreadsheets/d/1Q0y0GxQsiwm01qdit07KWlACNk59Ih2r/edit?usp=sharing&ouid=10933...

Anonymous
Not applicable

Hi @jaduncan0515 ,

 

(1) We can create measures.

Min_price = CALCULATE(MIN('Table'[Price]),FILTER(ALLSELECTED('Table'),'Table'[State]=MAX('Table'[State])))
Min_outourced = CALCULATE(MIN('Table'[Outsourced %]),FILTER(ALLSELECTED('Table'),'Table'[State]=MAX('Table'[State])))
Vendor_Name = CALCULATE(MAX('Table'[Vendor Name]),FILTER(ALLSELECTED('Table'),[State]=MAX('Table'[State]) && [Price]=[Min_price] && [Outsourced %]=[Min_outourced]))

(2) We can create a table.

Table 2 = SUMMARIZE(ALLSELECTED('Table'),[State],"min price",[Min_price],"min outourced",[Min_outourced],"vendor name",[Vendor_Name])

(3) Then the result is as follows.

vtangjiemsft_0-1716434642781.png

 

 

Best Regards,

Neeko Tang

If this post  helps, then please consider Accept it as the solution  to help the other members find it more quickly. 

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

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 Kudoed Authors