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

Conditional Sum Expression

Hi,

I have been trying to write a conditional sum expression and the syntax works but the numbers are wrong.

I have a list of Managers who each have some Preferred ("Yes") and some Not Preferred ("No") transactions. I want to sum up how much their Not Preferred spend is. When I use the below syntax, I get the TOTAL spend for the manager rather than just the Not Preferred Spend. I'm thinking it may need an "if" function somewhere but am not sure.

Thoughts are very appreciated!


I have added a calculated dimension to Manager:

=if([Preferred]='No',[Manager])

My expression is: Sum({$<Preferred={'No'}>}[Spend])


1 Solution

Accepted Solutions
Not applicable
Author

1 Reply
Not applicable
Author

figured it out!