Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
pnn44794
Partner - Specialist
Partner - Specialist

Summing Using "and" Conditional - Syntax Help

Hello:

 

I'm trying to write a Sum expression where I sum based if A like B AND Y like Z.

1 Solution

Accepted Solutions
sunny_talwar

1st you don't have the set analysis correctly for CIO (incorrect placement of curly bracket)

=Num(Sum({$<[Phase] = {'Finance*'}, {CIO = {'*'}>} RangeMax([Estimated Saves Minus Implementation Cost], 0)/1000000),'$###0') + Num(Sum({$<[Phase] = {Booked}>} RangeMax([Finance Confirmed 2016 Savings], 0)/1000000),'$###0')

So you are looking to avoid selection in CIO regardless of selection in CIO? May be this:

=Num(Sum({$<[Phase] = {'Finance*'}, CIO>} RangeMax([Estimated Saves Minus Implementation Cost], 0)/1000000),'$###0') + Num(Sum({$<[Phase] = {Booked}, CIO>} RangeMax([Finance Confirmed 2016 Savings], 0)/1000000),'$###0')

View solution in original post

4 Replies
sunny_talwar

1st you don't have the set analysis correctly for CIO (incorrect placement of curly bracket)

=Num(Sum({$<[Phase] = {'Finance*'}, {CIO = {'*'}>} RangeMax([Estimated Saves Minus Implementation Cost], 0)/1000000),'$###0') + Num(Sum({$<[Phase] = {Booked}>} RangeMax([Finance Confirmed 2016 Savings], 0)/1000000),'$###0')

So you are looking to avoid selection in CIO regardless of selection in CIO? May be this:

=Num(Sum({$<[Phase] = {'Finance*'}, CIO>} RangeMax([Estimated Saves Minus Implementation Cost], 0)/1000000),'$###0') + Num(Sum({$<[Phase] = {Booked}, CIO>} RangeMax([Finance Confirmed 2016 Savings], 0)/1000000),'$###0')

Not applicable

Bit syntax error in your orginal expression:


=Num(Sum({$<[Phase] = {'Finance*'}, CIO = {'*'}>} RangeMax([Estimated Saves Minus Implementation Cost], 0)/1000000),'$###0') + Num(Sum({$<[Phase] = {Booked}>} RangeMax([Finance Confirmed 2016 Savings], 0)/1000000),'$###0')

pnn44794
Partner - Specialist
Partner - Specialist
Author

Hello Sunny:

My apologies for the delay in replying.  Year End and it's crazy,  Anyway, yes, this works and very simple.  I continue to learn from one of the best!  Thank you, as always.

pnn44794
Partner - Specialist
Partner - Specialist
Author

Srikanth:

As with Sunny, my apologies for the delay in replying.  This was helpful and thanks for catching the syntax error.