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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
TomaKavi
Helper I
Helper I

how tu sum more filtered fields in one column

Hello guys,

is there a better way how to make a simple sum for specific fields in one Column than this below ? 

SR1100 positive 3 =
CALCULATE (
    [Total Value],
    FILTER (
        Total_2021,
        Total_2021[Consolidation account] IN { "V10000""V20000""V30000" }
    )
)
1 ACCEPTED SOLUTION

Hi @TomaKavi 

Thanks for your reply.

>> I need this measure to be a part of another measure. ....  how to nest the 3 filtered values and sum them together.

The usual approach is to create a measure to calculate the total, and then create a measure to call it, for example

measure 1= sumx(filter('table', 'table '[xxx]=....),'table'[value])
measure 2= 
  var _totalFromM1=[measure 1]
  var _expression=calculate(....)
return _totalFromM1+_expression

This is the simplest way.

 

Best Regards,

Community Support Team _Tang

If this post helps, please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

6 REPLIES 6
TomaKavi
Helper I
Helper I

actually not, I need this measure to be a part of another measure. I was more asking if there is another way ( a bit simple) how to nest the 3 filtered values and sum them together.

Hi @TomaKavi 

Thanks for your reply.

>> I need this measure to be a part of another measure. ....  how to nest the 3 filtered values and sum them together.

The usual approach is to create a measure to calculate the total, and then create a measure to call it, for example

measure 1= sumx(filter('table', 'table '[xxx]=....),'table'[value])
measure 2= 
  var _totalFromM1=[measure 1]
  var _expression=calculate(....)
return _totalFromM1+_expression

This is the simplest way.

 

Best Regards,

Community Support Team _Tang

If this post helps, please consider Accept it as the solution to help the other members find it more quickly.

and that is the poin HOW to add more values here  ,,Table [xxx] =......., how do you nest more parameters there ?

 

measure 1= sumx(filter('table', 'table '[xxx]=....),'table'[value])

 

Hi @TomaKavi 

Thanks for your reply.

>> how do you nest more parameters there

You can try 

 

measure 1= sumx(filter('table', 'table '[xxx1]=.... && 'table '[xxx2]=.... && 'table '[xxx3]=....),'table'[value])

 

 

Best Regards,

Community Support Team _Tang

If this post helps, please consider Accept it as the solution to help the other members find it more quickly.

got you, but what if we are talking about the same table, I guess the solution that I have written at the top is the only one right ?

v-xiaotang
Community Support
Community Support

Hi @TomaKavi 

You can choose according to your scenario. If you only need to call it once, use this method. 

vxiaotang_0-1655084662178.png

If you need to call it multiple times, create a table.

test = 
CALCULATE (
    SUM(Total_2021[value]),
    FILTER (
        Total_2021,
        Total_2021[Consolidation account] IN VALUES('filter'[Column1])
    )
)

vxiaotang_1-1655084835008.png

Best Regards,

Community Support Team _Tang

If this post helps, please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 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.