Forum Discussion
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?
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.
5 Replies
- MariuszCommunity 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.- AnonymousNot applicable
Thank you so much Mariusz it works! :smileyhappy:
- AnonymousNot 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?
- AnonymousNot 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