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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
voiciK
Frequent Visitor

Calculated measure with filter

Hi all,

 

I have a sample table like this:

 

TEST 
AccountAmount
5000 $    10.00
RES001 $    15.00
5001 $    23.00
LABOUR $    76.00
7051 $  168.00
5746 $  641.00

 

(Assuming the rows go on and on to >1000 rows with multiple values)

The account IDs are not in number format because some accounts have letters like the example above.

 

I want to create a new measure to summarise all the amounts for accounts starting with 5 (ie: 5000, 5001, etc)

 

Currently my measure looks like this:

 

Measure = CALCULATE(SUM(TEST[Amount]),TEST[Account]="5000"&&TEST[Account]="5001"&&TEST[Account]="5002" ... (and so on)

 

I wonder if there is a way to filter there 5xxx accounts in my formula? I tried TEST[Account]="5???" but it does not work.

 

Thank you

1 ACCEPTED SOLUTION
tex628
Community Champion
Community Champion

Hi @voiciK , 

Try this:

Measure = CALCULATE(SUM(TEST[Amount]),FILTER(TEST , LEFT('TEST'[ACCOUNT],1) = "5"))  

 


Connect on LinkedIn

View solution in original post

2 REPLIES 2
tex628
Community Champion
Community Champion

Hi @voiciK , 

Try this:

Measure = CALCULATE(SUM(TEST[Amount]),FILTER(TEST , LEFT('TEST'[ACCOUNT],1) = "5"))  

 


Connect on LinkedIn
voiciK
Frequent Visitor

Brilliant! 

 

Thank you 😄

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
Users online (7,908)