Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Anonymous
Not applicable

cumulative function over the last 12 months given a specific date

Hello,

 

I need to create a DAX measure to compute the total volume over the past 12 months from a specific date, cumulatively. This date is different for each user, and is represented in the LastProofOfFunds column.

Andreea11_0-1639142435904.png

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @Anonymous ,

 

Do you have the date column and the corresponded volume value in the table? If so you could refer the following measure.

 

Total Volume = CALCULATE(SUM('Table'[Volume]),FILTER(ALLSELECTED('Table'),'Table'[date]<=SELECTEDVALUE('Table'[LastProofOfFunds ])&&'Table'[date]>=EDATE(SELECTEDVALUE('Table'[LastProofOfFunds ]),-12)))

 

1.PNG

2.PNG

 

Best Regards,

Jay

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

Hi @Anonymous ,

 

Do you have the date column and the corresponded volume value in the table? If so you could refer the following measure.

 

Total Volume = CALCULATE(SUM('Table'[Volume]),FILTER(ALLSELECTED('Table'),'Table'[date]<=SELECTEDVALUE('Table'[LastProofOfFunds ])&&'Table'[date]>=EDATE(SELECTEDVALUE('Table'[LastProofOfFunds ]),-12)))

 

1.PNG

2.PNG

 

Best Regards,

Jay

ValtteriN
Super User
Super User

Hi,

Here is an example.

Start data:

ValtteriN_0-1639146595017.png

Dax:

RT12 = CALCULATE (
sum(RT12[Value]),
all(RT12[Date]),
DATESBETWEEN (
'RT12'[Date],
DATEADD (
LASTDATE ( DATEADD ( 'RT12'[Date], -12, MONTH ) ),
+1,
DAY
),
LASTDATE ( 'RT12'[Date] )
)
)
End result:

ValtteriN_1-1639146635622.png

 

Hopefully this helps and if it does, consider accepting this as a solution!





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.