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
Here I have created a measure ie
Here I need to do sum of each month for example.. for feb 2+1 +3+1+4+2=13 and for march 4+2+1+5+3+1+6+4+1= 27
Please help me with a dax function for the below data
measure 1 measure 2 measure 3 month
1 1 2 jan
2 3 4 feb
4 5 6 march
1 3 4 April
1 4 5 may
2 8 9 June
2 8 10 JUl
Here in the above image I have headcount for column 2 is 6516 and head counts for id is 509 . And I have created country column to make relationship between column 2 and id column. when I'm giving month filter in visual filter I'm getting right count for column 2 but not for id I need to get 509 but I'm getting 504 please help me out
Here in the above image
Hi @Anonymous
According to your description, I create sample data to test the scenario. You can create column Month_Num to get the month number, and create measure Cumulative_Total to calculate cumulative total.
Month_Num = SWITCH(Table1[Month],"Jan",1,"Feb",2,"Mar",3,"Apr",4,"May",5,"Jun",6,"Jul",7,"Aug",8,"Sep",9,"Oct",10,"Nov",11,"Dec",12)
Cumulative_Total =
VAR _table=SUMMARIZE(Table1,Table1[Month_Num],"measure1",Table1[Measure1],"measure2",Table1[Measure2],"measure3",Table1[Measure3])
RETURN
SUMX(FILTER(_table,[Month_Num]<=EARLIER([Month_Num])),[measure1])+SUMX(FILTER(_table,[Month_Num]<=EARLIER([Month_Num])),[measure2])+SUMX(FILTER(_table,[Month_Num]<=EARLIER([Month_Num])),[measure3])
Here is my test pbix: https://qiuyunus-my.sharepoint.com/:u:/g/personal/pbipro_qiuyunus_onmicrosoft_com/EXm0jsV1b-xLswi55UudKfoBjothc41f3ZRcX0ry6SBPGg?e=bhkQZW
Best Regards,
Amy
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hello @v-xicai
I need to calculate som of 3 consecutive months i.e jan=jan, feb = jan+feb, march= Jan+feb+march, april= Feb+march+april, may= march+april+May, June= April+May+June................Dec= oct+nov+Dec..
Can you please help me out with the query.
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!