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
art12345
Frequent Visitor

Remove filter only on rows to sum but keep context filter

Hi all, 

 

I hope you can help me with the following. 

 

I have the following data set. 

 

LoanRegionBorrowerAmount
AEUCompany A100
BEUCompany B200
CUSCompany C300
EASIACompany D400
FASIACompany E500
GASIACompany D600

 

I want to create a measure that calculates the sum of "Amount" based on Region. The complicating factor is that I want to caculate it based on the Loan selected in a drop down. So for eample, after selecting Loan E, I want the result to be 1500. The Loan E is in ASIA and the total amount for that Region is 1500. 

I need something similar with Borrower, but the concept will be the same. 

 

I tried the following: Measure = Calculate( Sum(Data[Amount]), Removefilter(Data[Loan]), Data[Region] = Data[Region])

 

I think the Removefilter is making me lose the Data[Region] used to filter the Sum(Data[Amount]) but i dont know how to solve that. My searches so far did not get anywhere. 

 

Many thanks!

1 ACCEPTED SOLUTION
JamesFR06
Resolver IV
Resolver IV

HI

Var Region=selectedvalue(Data[Region])

return

Calculate( Sum(Data[Amount]), Removefilter(), Data[Region] = Data[Region])

View solution in original post

2 REPLIES 2
art12345
Frequent Visitor

This works! Many thanks. 

 

(Small edit needed at the end I think "... Data[Region] = Region"

JamesFR06
Resolver IV
Resolver IV

HI

Var Region=selectedvalue(Data[Region])

return

Calculate( Sum(Data[Amount]), Removefilter(), Data[Region] = Data[Region])

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.

Top Solution Authors
Top Kudoed Authors