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!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
I have the table above which lists the monthly income by month by client. I wanted to insert another column which would add the 12 month total income per client based on the report date and the client ID.
I have tried to use the formula below but to no success as it gives me the total value for all clients on each line.
Solved! Go to Solution.
@rmalhan12 , for new column try like
12MonthRI =
VAR _MAX = EOMONTH(IncomeSummary[ReportDate],0)
VAR _MIN = EOMONTH(IncomeSummary[ReportDate],-12)+1
return
SUMX(FILTER(IncomeSummary,IncomeSummary[ClientId] =earlier(IncomeSummary[ClientId] ) && IncomeSummary[ReportDate] <= _MAX && IncomeSummary[ReportDate] >= _MIN),IncomeSummary[GrossFCI])
For measures
try like
examples
Rolling 12 = CALCULATE(sum(Sales[Sales Amount]),DATESINPERIOD('Date'[Date],MAX('Date'[Date]),-12,MONTH))
Try new DAX function
Power BI Window function Rolling, Cumulative/Running Total, WTD, MTD, QTD, YTD, FYTD: https://youtu.be/nxc_IWl-tTc
Rolling Months Formula: https://youtu.be/GS5O4G81fww
@rmalhan12 , for new column try like
12MonthRI =
VAR _MAX = EOMONTH(IncomeSummary[ReportDate],0)
VAR _MIN = EOMONTH(IncomeSummary[ReportDate],-12)+1
return
SUMX(FILTER(IncomeSummary,IncomeSummary[ClientId] =earlier(IncomeSummary[ClientId] ) && IncomeSummary[ReportDate] <= _MAX && IncomeSummary[ReportDate] >= _MIN),IncomeSummary[GrossFCI])
For measures
try like
examples
Rolling 12 = CALCULATE(sum(Sales[Sales Amount]),DATESINPERIOD('Date'[Date],MAX('Date'[Date]),-12,MONTH))
Try new DAX function
Power BI Window function Rolling, Cumulative/Running Total, WTD, MTD, QTD, YTD, FYTD: https://youtu.be/nxc_IWl-tTc
Rolling Months Formula: https://youtu.be/GS5O4G81fww
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!