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
Burner
Regular Visitor

Sum of values filtered by a text column which starts with a given value

Hello everyone,

I'm new to powerbi and i'm try to figure out how to make some filters.

i have a table like this one here

 

DateNumber
CodeDescriptionValue
30/04/2018   160/0040/00120Company 1   185,93
30/04/2018   160/0018/20/005VAT     33,53
30/04/2018   160/0066/20/005goods1   152,40
30/04/2018   161/0040/00300Company2     25,00
30/04/2018   161/0018/20/005VAT       2,26
30/04/2018   161/0068/05/325Goods2     22,74
30/04/2018   162/0040/00015Company3   189,00
30/04/2018   162/0018/20/005VAT     24,09
30/04/2018   162/0068/05/040Service1   164,91

 

I want to summarize the column value filtered by the Code Column that stats with 40/

So i should have in return the sum of 185,93+25,00+189,00

Is there a way to do in dax funtion or should i create a conditional column and then summarize filtered by that new column?

 

thank you

1 ACCEPTED SOLUTION
VasTg
Memorable Member
Memorable Member

@Burner 

 

Use this DAX.

 

Measure = CALCULATE(SUM('Table'[Value]),FILTER('Table',LEFT('Table'[Code],3)="40/"))
 
If it helps, mark it as a solution
Kudos are nice too.
Connect on LinkedIn

View solution in original post

2 REPLIES 2
VasTg
Memorable Member
Memorable Member

@Burner 

 

Use this DAX.

 

Measure = CALCULATE(SUM('Table'[Value]),FILTER('Table',LEFT('Table'[Code],3)="40/"))
 
If it helps, mark it as a solution
Kudos are nice too.
Connect on LinkedIn

@VasTg 

 

thank you

it worked, even if i had to change the last , with a ;

Measure = CALCULATE(SUM('Table'[Value]),FILTER('Table',LEFT('Table'[Code];3)="40/"))

Helpful resources

Announcements
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!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

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