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

Data Days is here! Join us now for 60+ days of learning, challenges, and connection. Learn more

Reply
SIMMI
Frequent Visitor

Filtered table sum

Hi,

 

I was trying to get the sum of all the values recorded in the past 24 months. My knowledge with DAX is very basic. I have applied filters, but it's working at each row level. I want the filters to be applied at the table level. What I'm getting currently is:

SIMMI_0-1674041915967.png

whereas what I'm looking for is:

RaisedDateClosedDateMonthSummaryValueTEST
01/01/202005/01/202001/01/202010
02/02/202002/02/202001/02/202031
03/03/202003/03/202001/03/202024
04/03/202001/04/202001/04/202046
01/01/202010/04/202001/04/202026
05/06/202005/06/202001/06/2020212
01/01/202102/01/202101/01/2021314
01/05/202102/05/202101/05/2021217
06/06/202101/08/202101/08/2021419
02/01/202203/01/202201/01/2022223
03/03/202203/03/202201/03/2022321
04/04/202204/04/202201/04/2022222

 

Kindly help.

 

Thanks.

1 ACCEPTED SOLUTION
v-yueyunzh-msft
Community Support
Community Support

Hi , @SIMMI 

Thanks for the sample data you provide.

Here are the steps you can refer to :
(1)My test data is the same as yours.

(2)We can create a measure like this:

Measure = var _cur_month = MAX('Table'[MonthSummary])
var _pre_24month = EOMONTH(_cur_month,-25)
var _t = FILTER( ALLSELECTED('Table') ,'Table'[MonthSummary]>_pre_24month && 'Table'[MonthSummary]< _cur_month)
return
SUMX(_t , [Value])+0

(3)Then we can meet your need:

vyueyunzhmsft_0-1674098945066.png

Thank you for your time and sharing, and thank you for your support and understanding of PowerBI! 

 

Best Regards,

Aniya Zhang

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

View solution in original post

3 REPLIES 3
v-yueyunzh-msft
Community Support
Community Support

Hi , @SIMMI 

Thanks for the sample data you provide.

Here are the steps you can refer to :
(1)My test data is the same as yours.

(2)We can create a measure like this:

Measure = var _cur_month = MAX('Table'[MonthSummary])
var _pre_24month = EOMONTH(_cur_month,-25)
var _t = FILTER( ALLSELECTED('Table') ,'Table'[MonthSummary]>_pre_24month && 'Table'[MonthSummary]< _cur_month)
return
SUMX(_t , [Value])+0

(3)Then we can meet your need:

vyueyunzhmsft_0-1674098945066.png

Thank you for your time and sharing, and thank you for your support and understanding of PowerBI! 

 

Best Regards,

Aniya Zhang

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

Mahesh0016
Super User
Super User

@SIMMI can you Share the Sheet1 Data.

RaisedDateClosedDateMonthSummaryValue
01/01/202005/01/202001/01/20201
01/01/202010/04/202001/04/20202
02/02/202002/02/202001/02/20203
03/03/202003/03/202001/03/20202
04/03/202001/04/202001/04/20204
05/06/202005/06/202001/06/20202
01/01/202102/01/202101/01/20213
01/05/202102/05/202101/05/20212
06/06/202101/08/202101/08/20214
02/01/202203/01/202201/01/20222
03/03/202203/03/202201/03/20223
04/04/202204/04/202201/04/20222

Helpful resources

Announcements
Fabric Data Days is here Carousel

Fabric Data Days 2026

Don't miss out on Data Days, June 15 through August 7. Learn Fabric, Power BI, SQL, AI and more.

May Power BI Update Carousel

Power BI Monthly Update - May 2026

Check out the May 2026 Power BI update to learn about new features.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.