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!Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.
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
Thank you very much in advance for any help!! Please let me know if you would like any additional information.
Solved! Go to Solution.
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
Proud to be a Datanaut!
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
Proud to be a Datanaut!
This worked great! Thank you!!
Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!
Check out the October 2025 Power BI update to learn about new features.
User | Count |
---|---|
10 | |
7 | |
5 | |
4 | |
3 |
User | Count |
---|---|
12 | |
11 | |
10 | |
9 | |
8 |