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
Hi All,
I am trying to find a solution to add columns that sum across rows for customers as in the example below:
@Anonymous 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"
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 |
|---|---|
| 9 | |
| 9 | |
| 8 | |
| 6 | |
| 5 |
| User | Count |
|---|---|
| 23 | |
| 15 | |
| 15 | |
| 14 | |
| 9 |