Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredJoin 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.
Hi there,
Below is what my data model looks like. I would like to write a measure to calculated DueDate. If this is not possible, I'd appreciated if somebody can explain to me why? From help on other forums, I have been able to create a calculated column to create DueDate. I have also been shown how to do a table merge in Power Query (to get PaymentTerms) and then create a calculated column there.
Is it possible to write a measure for DueDate (and if not, why not)?
@michellepace , it should possible. Will work with row context
The first thing try to push this calculation into a sumx or AverageX
Sumx(Debtorpayable,<Formula>)
another option is to have min for min date and minx(Debtorpayable, related(customerpayable[payterm])) in the same formula
Hello @amitchandak Thank you for your reply. I have tried your suggestions (as depicted below) but somehow I'm still not enforcing row context. Also what I am a bit confused about, is that this is a date calculation. So using SUMX ... wouldn't that always return a number?
> The first thing try to push this calculation into a sumx or AverageX
Nope, this doesn't work for me. Below I first try to ensure I get the correct value for payment Terms. Some invoices should say 30, some 60... but none 570. Obviously adding things up.
> another option is to have min for min date and minx(Debtorpayable, related(customerpayable[payterm]))
Nope, this doesn't work for me either. The payment term which gets returned is then "30" for all invoices.
Question: I would like to know how to write the DAX formula for calculating due date. I obviously need row context as pointed out by Amit. Could someone please help me? And also, if it it is not too much to ask, explain the formula and how it works. I really need to get my head wrapped around this DAX. I think I may be missing an entire paradigm... or two or three!
Thanks very much 🙂
Michelle
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.