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.
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"
User | Count |
---|---|
14 | |
10 | |
7 | |
6 | |
5 |
User | Count |
---|---|
30 | |
19 | |
12 | |
7 | |
5 |