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!Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes! Register now.
Hi All,
I am trying to find a solution to add columns that sum across rows for customers as in the example below:
@checkstatap You can try these formulas for creating calculated column.
Last 3 Months =
VAR CurrentMonth = MAX(Table[Month])
RETURN
CALCULATE(
SUM(Table[Revenue]),
FILTER(
Table,
Table[Customer] = EARLIER(Table[Customer]) &&
Table[Month] >= CurrentMonth - 2
)
)
Last 6 Months =
VAR CurrentMonth = MAX(Table[Month])
RETURN
CALCULATE(
SUM(Table[Revenue]),
FILTER(
Table,
Table[Customer] = EARLIER(Table[Customer]) &&
Table[Month] >= CurrentMonth - 5
)
)
Last 9 Months =
VAR CurrentMonth = MAX(Table[Month])
RETURN
CALCULATE(
SUM(Table[Revenue]),
FILTER(
Table,
Table[Customer] = EARLIER(Table[Customer]) &&
Table[Month] >= CurrentMonth - 8
)
)
Is it possible to add a if statement here as well? So if 0 revenue, then "Lost Customer"
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.