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!To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.
Solved! Go to Solution.
Hi @AndreaCBS without file, model, logic... it is hard to spot issue.
Still, try v2 below
Avg v2=
VAR __max_date=MAX('Sales Invoices'[Date])
VAR X=
SUMX(
FILTER(
'Sales Invoices',
'Sales Invoices'[Date] < __max_date
),
'Sales Invoices'[AmountCRC]
)
RETURN
DIVIDE(X, [Quantity])
Proud to be a Super User!
Hi @AndreaCBS without file, model, logic... it is hard to spot issue.
Still, try v2 below
Avg v2=
VAR __max_date=MAX('Sales Invoices'[Date])
VAR X=
SUMX(
FILTER(
'Sales Invoices',
'Sales Invoices'[Date] < __max_date
),
'Sales Invoices'[AmountCRC]
)
RETURN
DIVIDE(X, [Quantity])
Proud to be a Super User!