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.
Hi Community,
I need some help writing a formula that will calculate when a customer is meant to pay for an item. The date they are meant to pay depends on 2 things, how many days their payment terms are and whether these terms are net or end of month. I have one column called "net or eom" and one called "payment terms"
The formula I have drafted on paper, that doesnt work in power BI is as below.
date customer meant to pay = if([net or eom]="net",[transaction date] + [payment terms]),(EOMONTH([transaction date],0)+[payment terms]
ideally my output should be in the format dd/mm/yyyy.
I think the reason it is not working is becuase i dont have explicit measures, i am not sure what arguments i need to change to explicit measures and how to do so
i think it also worth mentioning that currently these are all colums and none are measure. also colum [transaction date] is in one table and [payment terms] and [net or eom] sit in a different table. the tables are related by customer name.
thanks for all of your help!!
Russ
Solved! Go to Solution.
Hi @Russ99 ,
My sample is as below.
Table1:
Table2:
Relationship:
Measure:
date customer meant to pay =
VAR _Payment_terms =
SUM ( Table2[payment terms] )
VAR _net_or_eom =
MAX ( Table2[net or eom] )
VAR _Transaction_Date =
MAX ( Table1[Transaction Date] )
RETURN
IF (
_net_or_eom = "net",
_Transaction_Date + _Payment_terms,
EOMONTH ( _Transaction_Date, 0 ) + _Payment_terms
)
Result is as below.
Best Regards,
Rico Zhou
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Russ99 ,
My sample is as below.
Table1:
Table2:
Relationship:
Measure:
date customer meant to pay =
VAR _Payment_terms =
SUM ( Table2[payment terms] )
VAR _net_or_eom =
MAX ( Table2[net or eom] )
VAR _Transaction_Date =
MAX ( Table1[Transaction Date] )
RETURN
IF (
_net_or_eom = "net",
_Transaction_Date + _Payment_terms,
EOMONTH ( _Transaction_Date, 0 ) + _Payment_terms
)
Result is as below.
Best Regards,
Rico Zhou
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
this has worked really well for a lot of my data so thanks so much for that. however the measure customer meant to pay is throwing out some results in the year 2117 and some in the year 1900, do you know why this could be?
Customers without transaction dates?
nope, there are no blanks. i was wondering if was perhaps adding the amount of days to the year or month instead of the full date however this does not seem to be right.
Please provide sanitized sample data that fully covers your issue. Paste the data into a table in your post or use one of the file services. Please show the expected outcome.
Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!
Check out the September 2025 Power BI update to learn about new features.