This time we’re going bigger than ever. Fabric, Power BI, SQL, AI and more. We're covering it all. You won't want to miss it.
Learn moreLevel up your Power BI skills this month - build one visual each week and tell better stories with data! Get started
Hello,
I'm fairly new to DAX. I'm tying to compare the TYPE of just Work Order Warranty and Warranty Transaction based on the total QTY of the item. If the Sum of QTY of Work Order Warranty is greater than Warranty Transactions then out "Fullfilled" else "Pending" as a new column.
| ORG | Date | Item | TRX Value | QTY | TYPE |
| 1 | 1/1/2021 | A051787410541 | 5 | 8 | Work Order Annual/Modular/Parts Rebuild |
| 2 | 1/2/2021 | A052800208159 | 7 | 5 | Work Order Repair |
| 1 | 1/3/2021 | A0560326372 | 5.5 | 8 | Work Order Warranty |
| 2 | 1/4/2021 | A0560326372 | 6.7 | 5 | Warranty Transaction |
| 1 | 1/5/2021 | A051787410541 | 8.9 | 7 | Work Order Annual/Modular/Parts Rebuild |
| 2 | 1/6/2021 | A052800208159 | 8.87 | 8 | Work Order Annual/Modular/Parts Rebuild |
| 1 | 1/7/2021 | A0560326372 | 9.62 | 5 | Work Order Repair |
| 1 | 1/8/2021 | A0560326372 | 10.37 | 8 | Work Order Warranty |
Solved! Go to Solution.
Try this calculated column. I'm not sure if you want "Pending" for every row that is not "Fulfilled", or for every row that is not "Fulfilled" and TYPE = "Work Order Warranty" or "Warranty Transaction". The DAX can be easily adjusted to accommodate either scenario.
Status =
VAR vWorkOrderWarranty =
CALCULATE (
SUM ( Table1[QTY] ),
ALLEXCEPT ( Table1, Table1[Item] ),
Table1[TYPE] = "Work Order Warranty"
)
VAR vWarrantyTransaction =
CALCULATE (
SUM ( Table1[QTY] ),
ALLEXCEPT ( Table1, Table1[Item] ),
Table1[TYPE] = "Warranty Transaction"
)
VAR vResult =
SWITCH (
TRUE (),
Table1[TYPE]
IN { "Work Order Warranty", "Warranty Transaction" }
&& vWorkOrderWarranty > vWarrantyTransaction, "Fulfilled",
Table1[TYPE]
IN { "Work Order Warranty", "Warranty Transaction" }
&& vWorkOrderWarranty <= vWarrantyTransaction, "Pending"
)
RETURN
vResult
Proud to be a Super User!
Try this calculated column. I'm not sure if you want "Pending" for every row that is not "Fulfilled", or for every row that is not "Fulfilled" and TYPE = "Work Order Warranty" or "Warranty Transaction". The DAX can be easily adjusted to accommodate either scenario.
Status =
VAR vWorkOrderWarranty =
CALCULATE (
SUM ( Table1[QTY] ),
ALLEXCEPT ( Table1, Table1[Item] ),
Table1[TYPE] = "Work Order Warranty"
)
VAR vWarrantyTransaction =
CALCULATE (
SUM ( Table1[QTY] ),
ALLEXCEPT ( Table1, Table1[Item] ),
Table1[TYPE] = "Warranty Transaction"
)
VAR vResult =
SWITCH (
TRUE (),
Table1[TYPE]
IN { "Work Order Warranty", "Warranty Transaction" }
&& vWorkOrderWarranty > vWarrantyTransaction, "Fulfilled",
Table1[TYPE]
IN { "Work Order Warranty", "Warranty Transaction" }
&& vWorkOrderWarranty <= vWarrantyTransaction, "Pending"
)
RETURN
vResult
Proud to be a Super User!
Check out the April 2026 Power BI update to learn about new features.
Sign up to receive a private message when registration opens and key events begin.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
| User | Count |
|---|---|
| 37 | |
| 28 | |
| 28 | |
| 19 | |
| 17 |
| User | Count |
|---|---|
| 69 | |
| 37 | |
| 32 | |
| 28 | |
| 24 |