Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
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!!
Check out the July 2025 Power BI update to learn about new features.
User | Count |
---|---|
25 | |
10 | |
7 | |
6 | |
6 |
User | Count |
---|---|
30 | |
11 | |
11 | |
10 | |
6 |