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!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
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))
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 38 | |
| 38 | |
| 37 | |
| 28 | |
| 27 |
| User | Count |
|---|---|
| 124 | |
| 89 | |
| 73 | |
| 66 | |
| 65 |