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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
Anonymous
Not applicable

MIN Value of Multiple Columns across Multiple Tables with a Shared Table

Hello Power BI Community!! 

 

I am fairly new to DAX and having a few issues writing an expression for the below logic statement. I've attempted a few combinations of IF, RELATED, MIN/MINX with no luck. 

 

Avail_Transfer_Qty = IF 'OpenUsageTable'(OpenUsage Qty) >= 'ExcessTable'(Excess Qty)

                                      THEN 'ExcessTable'(Excess Qty)

                                       NOT  'OpenUsageTable'(OpenUsage Qty)

 

Data Model:  *Relationships use "Product" as Shared Value

 

Data Model Example.PNG

 

 

Thank you very much in advance for any help!! Please let me know if you would like any additional information.

 

 

 

1 ACCEPTED SOLUTION
Stachu
Community Champion
Community Champion

are you looking for a calculated measure or a column?

Column makes sense in the Product table, you can then use RELATEDTABLE with to get all the relevant rows from Open and Excess tables, sum the quantities (with SUMX) and then compare the aggregates


for measure you can use TREATAS
https://www.sqlbi.com/articles/propagate-filters-using-treatas-in-dax/

but for the comparison you should first aggregate values from Open and Excess

 

Did I answer your question? Mark my post as a solution!

Proud to be a Datanaut!



Did I answer your question? Mark my post as a solution!
Thank you for the kudos 🙂

View solution in original post

2 REPLIES 2
Stachu
Community Champion
Community Champion

are you looking for a calculated measure or a column?

Column makes sense in the Product table, you can then use RELATEDTABLE with to get all the relevant rows from Open and Excess tables, sum the quantities (with SUMX) and then compare the aggregates


for measure you can use TREATAS
https://www.sqlbi.com/articles/propagate-filters-using-treatas-in-dax/

but for the comparison you should first aggregate values from Open and Excess

 

Did I answer your question? Mark my post as a solution!

Proud to be a Datanaut!



Did I answer your question? Mark my post as a solution!
Thank you for the kudos 🙂

Anonymous
Not applicable

This worked great! Thank you!!

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.