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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

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
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

Power BI Carousel June 2024

Power BI Monthly Update - June 2024

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

RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.