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

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.

Reply
michellepace
Resolver III
Resolver III

MEASURE for calculating DueDate of invoice (two tables)

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)? 

 

a.jpg

2 REPLIES 2
amitchandak
Super User
Super User

@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

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

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.

a.png

 

> 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

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.