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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
Anonymous
Not applicable

summation of value between ranges

Hi All,

Below is my sample data,

Table1

RohiniP-26_3-1610088626603.png

Table2

RohiniP-26_7-1610089164182.png

Expected output:

for date filter (01-01-2020 to 29-02-2020)

RohiniP-26_8-1610089191452.png

for date filter (01-01-2020 to 31-03-2020)

RohiniP-26_9-1610089223824.png

 I need to dynamically filter Table1 between the start range and end range of 'No' column. The start and end range is given in Table2. I want to create a measure for column 'total', which is the summation of amount between 'No' ranges.

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@Anonymous , Create a new measure like this and check

 

sumx(filter(values(Table1[No]), Table1[No] >= min(Table2[Start range]) && Table1[No] <= max(Table2[End range]) ), Table1[Amount])

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

View solution in original post

2 REPLIES 2
amitchandak
Super User
Super User

@Anonymous , Create a new measure like this and check

 

sumx(filter(values(Table1[No]), Table1[No] >= min(Table2[Start range]) && Table1[No] <= max(Table2[End range]) ), Table1[Amount])

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube
Anonymous
Not applicable

yes.......It worked out.

In that measure using sumx function, i have given sum(amount) as measure, which is created in table1 in expression part because it won't accpet columns.

Helpful resources

Announcements
July PBI25 Carousel

Power BI Monthly Update - July 2025

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

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.