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

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.

Reply
asad98
Regular Visitor

KPI tile returning a value based on multiple variables

Hi guys, I am fairly new to power bi and am trying to learn. I have a case and want to see if power bi is able to do this. So the case goes like this,

 

I have multiple products, let's say A, B, C, D that can be sourced from multiple sources S1, S2, S3 and each source has its own cost for specific assets. Sample dataset would like below : -

 

| Asset | Source |    Cost     |

|    A    |     S2    |    1000     |

|    B    |     S3    |     2000    |

|    C    |     S1    |     3000    |

|    A    |     S3    |     500      |

|    B    |     S1    |     4000    |

|    A    |     S1    |     1500    |

|    B    |     S2    |      2500   |

|    C    |     S2    |      3000   |

 

Now would it be possible to create a measure that returns a value indicating where I should order asset A from - S1, S2, or S3 so I can get the same product from the cheapest source. Maybe it can be possible to select a number of sources and the measure will calculate based on the selected sources.

 

Any help will be very appreciated!

Thank you!

1 ACCEPTED SOLUTION
Ashish_Mathur
Super User
Super User

Hi,

You may download my PBI file from here.

Hope this helps.

Untitled.png


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

View solution in original post

2 REPLIES 2
Ashish_Mathur
Super User
Super User

Hi,

You may download my PBI file from here.

Hope this helps.

Untitled.png


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
amitchandak
Super User
Super User

@asad98 ,  USe this for source and Min for cost

 

Min Source =
VAR __id = MAX ('Table'[Asset] )
VAR __Cost = CALCULATE ( MIN('Table'[Cost] ), ALLSELECTED ('Table' ), 'Table'[Asset] = __id )
RETURN CALCULATE ( MIN ('Table'[Source] ), VALUES ('Table'[Asset ),'Table'[Asset] = __id,'Table'[Cost] = __Cost )

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

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.