# App Development

Announcements
cancel
Showing results for
Did you mean:
Partner

## Set Analysis Criteria to move with selection

Hi,

I have quite a simple question but can't seem to figure it out.

I have the following formula:

sum({< ProductName = {'CBL*'}>}BALANCE_QTY)

Because I only want to look at products starting with CBL, BUT if I select 1 product with CBL i still want it to move with the selection of that product. Writing the set analysis like this will always show the total of all products starting with CBL.

Hope you can provide me with an answer how to fix this.

Regards, Paul

1 Solution

Accepted Solutions
Champion

Hi,

you can try this:

=if(GetSelectedCount(ProductName)=0,

sum({< ProductName = {'CBL*'}>}BALANCE_QTY),

sum(BALANCE_QTY)

)

11 Replies
Champion

Hi,

you can try this:

=if(GetSelectedCount(ProductName)=0,

sum({< ProductName = {'CBL*'}>}BALANCE_QTY),

sum(BALANCE_QTY)

)

Partner
Author

Champion

I'm sure there is other solutions for this, in the meantime you can use it

good luck

MVP

Sum({<ProductName *= {'CBL*'}>} BALANCE_QTY)

Champion

Hi stalwar1‌, this will work when there is no selection on the product and also when there is one product selected ?

MVP

I was not 100% sure what Paul wanted, but this is what it will do

ProductName

CBL xyz

CBL abc

CBL ddd

JBL xyz

JBL abc

JBL ddd

When nothing is selected... the expression will show this

CBL xyz

CBL abc

CBL ddd

When CBL abc is selected.... the expression should show

CBL abc

When JBL abc is selected ... the expression will show nothing

Updated my post with images and sample

Champion

it is replacing what I wrote above

MVP

Your's is slightly different... if you select JBL abc... you will see JBL abc with your expression

For the other two cases... it will work the same way

But again, I don't know the requirement and your solution may very well be what is needed here

Champion

sorrry, it is the fast food effect, I need a coffee ..