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

SUM fuction with filter

Hi all,

 

I am new to DAX, so thanks for your patience 🙂

 

I am adding a screenshot here: I want to caclulate in DAX the % difference of "New" & "New to Partner" compared to "existing customers":

 

judithnig_0-1672824241161.png

 

 

Thanks upfront, 

Judith

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @judithnig ,

Please have a try.

Create a measure.

measure =
CALCULATE (
    SUM ( table[value] ),
    FILTER (
        ALL ( table ),
        table[column1] = "partner1"
            || table[column1] = "partner2"
    )
)

 

How to Get Your Question Answered Quickly 

 

If it does not help, please provide more details with your desired output and pbix file without privacy information (or some sample data) .

 

Best Regards
Community Support Team _ Polly

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

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

Hi @judithnig ,

Please have a try.

Create a measure.

measure =
CALCULATE (
    SUM ( table[value] ),
    FILTER (
        ALL ( table ),
        table[column1] = "partner1"
            || table[column1] = "partner2"
    )
)

 

How to Get Your Question Answered Quickly 

 

If it does not help, please provide more details with your desired output and pbix file without privacy information (or some sample data) .

 

Best Regards
Community Support Team _ Polly

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

MFelix
Super User
Super User

Hi @judithnig ,

 

What do you mean by filtering? Do you want your measure to always give the same result even when you use filters or slicers or do you want it to be dinamic?

 

DAX calculations are based on context so if you have a simple SUM and you have a filter of those columns the calculations will be presented correctly if you want to have it all the same then you need to do something similar to:

Sum metric = CALCULATE ( SUM(Table[Column]), Table[Partner1] = Value , Table[Partner2] = Value)

 

Replace value with the ones that you need.


Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português



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