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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

Sum values from column without specific records

Hello. I am trying to sum values form a column but without specific records that are called "WAY TO FIRST CLIENT" and "WAY BACK HOME". The formula I am trying to use is below but it doesn't work. Could somebody please help me with that?

 

Measure = CALCULATE(SUM(Table[Column]);FILTER(Table;"WAY TO FIRST CLIENT" AND "WAY BACK HOME"))
1 ACCEPTED SOLUTION
Mariusz
Community Champion
Community Champion

Hi @Anonymous 

You can try something like below, but if you provide a data sample its always better.

Measure = 
CALCULATE(
    SUM( YourTable[ValueColumn] ),
    YourTable[FilterColumn] IN { "WAY TO FIRST CLIENT", "WAY BACK HOME" }
)
Best Regards,
Mariusz

If this post helps, then please consider Accepting it as the solution.

Please feel free to connect with me.
Mariusz Repczynski

 

View solution in original post

5 REPLIES 5
Mariusz
Community Champion
Community Champion

Hi @Anonymous 

You can try something like below, but if you provide a data sample its always better.

Measure = 
CALCULATE(
    SUM( YourTable[ValueColumn] ),
    YourTable[FilterColumn] IN { "WAY TO FIRST CLIENT", "WAY BACK HOME" }
)
Best Regards,
Mariusz

If this post helps, then please consider Accepting it as the solution.

Please feel free to connect with me.
Mariusz Repczynski

 

Anonymous
Not applicable

Mariusz I am sorry but the formula you've given me sums visits "WAT TO FIRST CLIENT" and "WAY BACK HOME" and I would like to sum everything WITHOUT these 2. What should I use instead "IN" in formula? 

Anonymous
Not applicable

I worked it out I added "NOT" before Visits[VisitClientName]. You can see it below. 

 

Time spent in shops = CALCULATE(
SUM(Visits[Visit time]);
NOT OM_Visits[VisitClientName] IN { "WAY TO FIRST CLIENT"; "WAY BACK HOME"}
)/60

Hi @Anonymous 

Happy you've sorted it!

 

Thanks
Mariusz

Anonymous
Not applicable

Thank you so much Mariusz it works! Smiley Happy

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.