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!Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
I created the following formula and it is working correctly:
Open Lines due this month = Calculate(sum('Open Sales Orders'[SO Remaining Amount]),filter('Open Sales Orders',AND('Open Sales Orders'[Shipping Date]>MIN('Date'[StartCurrentMonth]),'Open Sales Orders'[Shipping Date]<MIN('Date'[StartNextMonth]))))
but it returns no data.
Hoping someone might have a suggestion for me.
Thanks.
Solved! Go to Solution.
@GB74 , Try like
//based on selecteddate or or today
Open Lines due previous months =
var _max = maxx(allselected('Date'), 'Date'[Date]) //or//Today()
return
Calculate(sum('Open Sales Orders'[SO Remaining Amount]),filter('Open Sales Orders','Open Sales Orders'[Shipping Date]<eomonth(_max,-1) +1))
//based on selecteddate or or today
Open Lines due 2nd previous months =
var _max = maxx(allselected('Date'), 'Date'[Date]) //or//Today()
return
Calculate(sum('Open Sales Orders'[SO Remaining Amount]),filter('Open Sales Orders','Open Sales Orders'[Shipping Date]<eomonth(_max,-2) +1))
Thanks amitchandak.
That works perfectly for previous month.
I could also replace -1 near the end of the formula with 0 to calculate the value for this month.
However, if I then change it to +1 (or just 1), the value displayed is far too large. I feel that it is suddenly adding all future amounts, not just those due next month.
I hope I've explained that well.
@GB74 ,
Just due next month
//based on selecteddate or or today
Open Lines due previous months =
var _max = maxx(allselected('Date'), 'Date'[Date]) //or//Today()
return
Calculate(sum('Open Sales Orders'[SO Remaining Amount]),filter('Open Sales Orders', eomonth('Open Sales Orders'[Shipping Date],0) = eomonth(_max,1) +1))
@GB74 , Try like
//based on selecteddate or or today
Open Lines due previous months =
var _max = maxx(allselected('Date'), 'Date'[Date]) //or//Today()
return
Calculate(sum('Open Sales Orders'[SO Remaining Amount]),filter('Open Sales Orders','Open Sales Orders'[Shipping Date]<eomonth(_max,-1) +1))
//based on selecteddate or or today
Open Lines due 2nd previous months =
var _max = maxx(allselected('Date'), 'Date'[Date]) //or//Today()
return
Calculate(sum('Open Sales Orders'[SO Remaining Amount]),filter('Open Sales Orders','Open Sales Orders'[Shipping Date]<eomonth(_max,-2) +1))
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!