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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

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
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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