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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

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
July 2025 community update carousel

Fabric Community Update - July 2025

Find out what's new and trending in the Fabric community.

July PBI25 Carousel

Power BI Monthly Update - July 2025

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

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.