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
hello!
I have a dax question concerning average open balance. My data looks like this:
I have linked a date calendar table to my fact table.
I have created an open balance measure:
Solved! Go to Solution.
@Anonymous , I think this measure might do what you are after:
Avg Balance =
VAR vFirstDate = FIRSTDATE(ALLSELECTED(_Date[Date]))
VAR vLastDate = LASTDATE('_Date'[Date])
RETURN
AVERAGEX(
CALCULATETABLE(
'_Date'
,_Date[Date] >= vFirstDate
, _Date[Date] <= vLastDate
)
,[Open Balance]
)With your test data, here are the Avg Balance it gives for each day in Jan 2022. For the month of Jan 2022, the average balance is 4000 which I think it right
9 days @ 5000 = 45000
5 days @ 3000 = 15000
15 days @ 4000 = 60000
2 days @ 2000 = 4000
total = 124000 / 31 days = 4000
@Anonymous , I think this measure might do what you are after:
Avg Balance =
VAR vFirstDate = FIRSTDATE(ALLSELECTED(_Date[Date]))
VAR vLastDate = LASTDATE('_Date'[Date])
RETURN
AVERAGEX(
CALCULATETABLE(
'_Date'
,_Date[Date] >= vFirstDate
, _Date[Date] <= vLastDate
)
,[Open Balance]
)With your test data, here are the Avg Balance it gives for each day in Jan 2022. For the month of Jan 2022, the average balance is 4000 which I think it right
9 days @ 5000 = 45000
5 days @ 3000 = 15000
15 days @ 4000 = 60000
2 days @ 2000 = 4000
total = 124000 / 31 days = 4000
Amazing! Thank you so much. Time for more dax training for me 🙂
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!
| User | Count |
|---|---|
| 102 | |
| 79 | |
| 57 | |
| 51 | |
| 46 |